mlos_bench.storage.sql.tunable_config_trial_group_data

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

Classes

TunableConfigTrialGroupSqlData

SQL interface for accessing the stored experiment benchmark tunable config trial

Module Contents

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

Bases: mlos_bench.storage.base_tunable_config_trial_group_data.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.

Parameters:
property results_df: pandas.DataFrame[source]

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

Returns:

results – 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.

Return type:

pandas.DataFrame

property trials: Dict[int, mlos_bench.storage.base_trial_data.TrialData][source]

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

Returns:

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

Return type:

Dict[int, TrialData]

property tunable_config: mlos_bench.storage.base_tunable_config_data.TunableConfigData[source]

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

Return type:

TunableConfigData