Code for polyaxon tutorials and examples
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
azure Add logs volume and update config Feb 2, 2018
gke Readd upload pvc Oct 1, 2018
in_cluster Update examples to use 0.3.9 Feb 18, 2019
tracking Update examples to use 0.3.9 Feb 18, 2019
.gitignore Update readme and add license Jan 18, 2018
LICENSE Update License Oct 2, 2018 Update examples to use 0.3.9 Feb 18, 2019

License: MIT Docs Release Slack


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')
# 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='', 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