mlos_bench.storage.sql.tunable_config_trial_group_data module

An interface to access the tunable config trial group data stored in SQL DB.

class mlos_bench.storage.sql.tunable_config_trial_group_data.TunableConfigTrialGroupSqlData(*, engine: Engine, schema: DbSchema, experiment_id: str, tunable_config_id: int, tunable_config_trial_group_id: int | None = None)

Bases: TunableConfigTrialGroupData

SQL interface for accessing the stored experiment benchmark tunable config trial group data.

A (tunable) config is used to define an instance of values for a set of tunable parameters for a given experiment and can be used by one or more trial instances (e.g., for repeats), which we call a (tunable) config trial group.

Attributes:
experiment_id

ID of the experiment.

results_df

Retrieve all results for this (tunable) config trial group as a single DataFrame.

trials

Retrieve the trials’ data for this (tunable) config trial group from the storage.

tunable_config

Retrieve the (tunable) config data for this (tunable) config trial group from the storage.

tunable_config_id

ID of the config.

tunable_config_trial_group_id

The unique ID (within this experiment) of the (tunable) config trial group.

property results_df: DataFrame

Retrieve all results for this (tunable) config trial group as a single DataFrame.

Returns:
resultspandas.DataFrame

A DataFrame with configurations and results from all trials of the experiment. Has columns [trial_id, config_id, ts_start, ts_end, status] followed by tunable config parameters (prefixed with “config.”) and trial results (prefixed with “result.”). The latter can be NULLs if the trial was not successful.

See also

ExperimentData.results
property trials: Dict[int, TrialData]

Retrieve the trials’ data for this (tunable) config trial group from the storage.

Returns:
trialsDict[int, TrialData]

A dictionary of the trials’ data, keyed by trial id.

property tunable_config: TunableConfigData

Retrieve the (tunable) config data for this (tunable) config trial group from the storage.

Returns:
TunableConfigData