Giter Site home page Giter Site logo

clark-wu / polyaxon-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from polyaxon/polyaxon-examples

0.0 1.0 0.0 620 KB

Code for polyaxon tutorials and examples

Home Page: https://docs.polyaxon.com/tutorials

License: MIT License

Python 99.47% Shell 0.53%

polyaxon-examples's Introduction

License: MIT Docs Release Slack

polyaxon-examples

Code for polyaxon tutorials and examples.

This repository contains examples of using Polyaxon with all major Machine Learning and Deep Learning libraries, including fastai, torch, sklearn, chainer, caffe, keras, tensorflow, mxnet, and Jupyter notebooks.

If you don't see something you need, Don't hesitate to contact us.

Examples Structure

This repository has 2 main directories containing examples for running experiments in-cluster, i.e. scheduled and managed by a Polyaxon Deployment, as well as experiment running on different platforms and tracked by Polyaxon, i.e. experiments running on laptops, spark, other platforms.

The examples have a comment # Polyaxon to show what is added to a raw code to enable the lightweight Polyaxon integration.

Getting Started

If you are new to Polyaxon we recommend reading our quick-start guide which explains some of the core Platform capabilities.

Setup & Installation

Please check our documentation to learn about how to deploy Polyaxon.

All examples (in-cluster and on other examples running on other platforms) require our client to track and add instrumentation to the experiments.

in-cluster Examples

In order to run these examples, you need to deploy a Polyaxon with a scheduling component enabled.

Tracking Examples

These examples should run with all type of Polyaxon deployments.

To run the tracking examples, you need to configure a client to communicate with Polyaxon API, there are many ways to configure the client, in this example we use an environment approach to have minimal impact on the code, in other terms, this approach allow us to create an experiment with the minimum code required:

from polyaxon_client.tracking import Experiment

...
experiment = Experiment(project='project-name')
experiment.create()
...
# Tracking here, e.g.

experiment.log_params(loss=args.loss, penalty=args.penalty, l1_ratio=args.l1_ratio, max_iter=args.max_iter, tol=args.tol)
...
experiment.log_data_ref(data=X, data_name='dataset_X')
...
experiment.log_metrics(loss=0.1, accuracy=0.9)

If you wish to explicitly set the configuration for your experiment, you need to provide a configured client:

client = PolyaxonClient(host='123.123.123.123', token='my-token-hash')  # See other params, i.e. http_port, ws_port, ...
experiment = Experiment(project='project-name', client=client)

# The rest is the same
...

To learn more how to configure Polyaxon Client & Polyaxon Tracking, please see our documentation

polyaxon-examples's People

Contributors

danielfrg avatar mmourafiq avatar vfdev-5 avatar yu-iskw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.