syne_tune.experiments.launchers.hpo_main_common module

syne_tune.experiments.launchers.hpo_main_common.str2bool(v)[source]
Return type:

bool

class syne_tune.experiments.launchers.hpo_main_common.Parameter(name, type, help, default, required=False)[source]

Bases: object

name: str
type: Any
help: str
default: Any
required: bool = False
class syne_tune.experiments.launchers.hpo_main_common.ConfigDict(**kwargs)[source]

Bases: object

Dictinary with arguments for launcher scripts. Expected params as Parameter(name, type, default value)

check_if_all_paremeters_present(desired_parameters)[source]

Verify that all the parameers present in desired_parameters can be found in this ConfigDict

extra_parameters()[source]

Return all parameters beyond those required Required are the defauls and those requested in argparse

Return type:

List[Dict[str, Any]]

expand_base_arguments(extra_base_arguments)[source]

Expand the list of base argument for this experiment with those in extra_base_arguments

static from_argparse(extra_args=None)[source]

Build the configuration dict from command line arguments

Parameters:

extra_args (Optional[List[Dict[str, Any]]]) – Extra arguments for command line parser. Optional

Return type:

ConfigDict

static from_dict(loaded_config=None)[source]

Read the config from a dictionary

Return type:

ConfigDict

syne_tune.experiments.launchers.hpo_main_common.set_logging_level(args)[source]
syne_tune.experiments.launchers.hpo_main_common.get_metadata(seed, method, experiment_tag, benchmark_name, random_seed, max_size_data_for_model=None, benchmark=None, extra_metadata=None)[source]

Returns default value for metadata passed to Tuner.

Parameters:
  • seed (int) – Seed of repetition

  • method (str) – Name of method

  • experiment_tag (str) – Tag of experiment

  • benchmark_name (str) – Name of benchmark

  • random_seed (int) – Master random seed

  • max_size_data_for_model (Optional[int]) – Limits number of datapoints for surrogate model of BO, MOBSTER or HyperTune

  • benchmark (Union[SurrogateBenchmarkDefinition, RealBenchmarkDefinition, None]) – Optional. Take n_workers, max_wallclock_time from there

  • extra_metadata (Optional[Dict[str, Any]]) – metadata updated by these at the end. Optional

Return type:

Dict[str, Any]

Returns:

Default metadata dictionary

syne_tune.experiments.launchers.hpo_main_common.extra_metadata(args, extra_args)[source]
Return type:

Dict[str, Any]

syne_tune.experiments.launchers.hpo_main_common.config_from_argparse(extra_args, backend_specific_args)[source]

Define the configuration directory based on extra arguments

Return type:

ConfigDict