aup.EE.Experiment module

aup.EE.Experiment is called by aup.__main__ to start an experiment.

See Configure HPO Algorithm for configuration specification.

APIs

class Experiment(exp_config, username=None, connector=None, auppath='.aup', sleep_time=1, eid=None, start=True, request_stop_time=5)[source]

Bases: object

Experiment Class - create and run an experiment

Parameters
  • exp_config (BasicConfig.BasicConfig) – configuration of the experiment

  • username (str) – username, default: None - will use login username

  • connector (AbstractConnector) – connector to database

  • auppath (str) – Auptimizer env.ini file folder, default is either ./.aup or ~/.aup

  • sleep_time (int) – time to pause between jobs

add_refresh_signal()[source]
add_suspend_signal()[source]
finish()[source]

Finish experiment if no job is running

Returns

job id, best score

Return type

(int, float)

resume(filename)[source]

Restore previous experiment, previous job during suspension won’t be run in this round

Parameters

filename (str) – filename (saved by pickle as exp%d.pkl)

start()[source]

Start experiment

submit_job(job=None, rid_blacklist=None)[source]

Submit a new job to run if there is resource available :param job: optional job parameter in case a job needs resubmitting :type job: aup.EE.Job.Job object :param rid_blacklist: resource ids to exclude when submitting job :type rid_blacklist: [int]

Returns

True if job submitted, else False

update(score, jid)[source]
Callback function passed to aup.EE.Resource.AbstractResourceManager to

update the job history (also proposer and connector)

Parameters
  • score (float) – score returned from job (using aup.utils.print_result())

  • jid (int) – job id