Welcome to Polaris’s documentation!

class polaris.Bounds(label, low, high, q=None)[source]

A class to declare range of each hyperparameters. For now, Polaris do not adapt to category variable.

class polaris.Domain(bounds, algo='random')[source]

A class to store bounds and searching new parameters.

class polaris.Polaris(fn, bounds, algo, trials, max_evals=10, run_once=False, exp_key=None, logger=None, debug=False, args=None)[source]

A client for the Polaris.

run(use_mpi=False)[source]

Run an experiment sequentially with one process up to max_evals count. The expriment will early stop, if params become None

use_mpi : boolean
boolean for using mpi or not
run_parallel()[source]

Run an experiment in parallel.

Polaris use RabbitMQ to pass arguments from client to worker. You need to start at least one worker to start an experiment.

class polaris.Trials[source]

A class for storing trials data.

add(result, params, exp_info=None)[source]

A method to add each trial result

get_train_data()[source]

A method to get train data. The train data is arranged in alphabetical order of the name of parameters.

class polaris.rabbitmq.JobClient(polaris)[source]

A client class for parallel experiments.

The instance of this class send a new job to workers and calculate next parameters in response to the requsest from a worker.

This client adopt the RPC pattern. Therefore all results will be accumulated on client side.

on_request(ch, method, props, body)[source]

A method to receive job request from workers After receiving request, this method will send a job to them.

on_response(ch, method, props, body)[source]

A method to receive the result of experiment from workers.

start()[source]

A method to start consuming job requests.

class polaris.rabbitmq.JobWorker(args, logger=None, debug=False)[source]

A worker class for parallel experiments.

You can start the worker like below. polaris-worker –exp-key this_is_test

And if you want to run this worker on multi node environment, you have to add –mpi flag.