Legacy Database¶
orion.storage.legacy
– Legacy storage¶
-
class
orion.storage.legacy.
Legacy
(database=None, setup=True)[source]¶ Legacy protocol, store all experiments and trials inside the Database()
Parameters: - config: Dict
configuration definition passed from experiment_builder to storage factory to legacy constructor. See Database for more details
- setup: bool
Setup the database (create indexes)
Attributes: - instance
Methods
count_broken_trials
(experiment)See count_broken_trials()
count_completed_trials
(experiment)See count_completed_trials()
create_experiment
(config)See create_experiment()
fetch_experiments
(query[, selection])See fetch_experiments()
fetch_lost_trials
(experiment)See fetch_lost_trials()
fetch_noncompleted_trials
(experiment)See fetch_noncompleted_trials()
fetch_pending_trials
(experiment)See fetch_pending_trials()
fetch_trials
([experiment, uid])See fetch_trials()
fetch_trials_by_status
(experiment, status)See fetch_trials_by_status()
get_trial
([trial, uid])See get_trial()
push_trial_results
(trial)See push_trial_results()
register_lie
(trial)See register_lie()
register_trial
(trial)See register_trial()
reserve_trial
(experiment)See reserve_trial()
retrieve_result
(trial[, results_file])Parse the results file that was generated by the trial process. set_trial_status
(trial, status[, heartbeat])See set_trial_status()
update_experiment
([experiment, uid, where])See update_experiment()
update_heartbeat
(trial)Update trial’s heartbeat -
retrieve_result
(trial, results_file=None, **kwargs)[source]¶ Parse the results file that was generated by the trial process.
Parameters: - trial: Trial
The trial object to be updated
- results_file: str
the file handle to read the result from
Returns: - returns the updated trial object
Notes
This does not update the database!
-
orion.storage.legacy.
get_database
()[source]¶ Return current database
This is a wrapper around the Database Singleton object to provide better error message when it is used without being initialized.
Raises: - RuntimeError
If the underlying database was not initialized prior to calling this function
Notes
To initialize the underlying database you must first call Database(…) with the appropriate arguments for the chosen backend