syne_tune.experiments.baselines module

class syne_tune.experiments.baselines.MethodArguments(config_space, metric, mode, random_seed, resource_attr, max_resource_attr=None, scheduler_kwargs=None, transfer_learning_evaluations=None, use_surrogates=False, fcnet_ordinal=None, num_gpus_per_trial=1)[source]

Bases: object

Arguments for creating HPO method (scheduler). We collect the union of optional arguments for all use cases here.

Parameters:
  • config_space (Dict[str, Any]) – Configuration space (typically taken from benchmark definition)

  • metric (str) – Name of metric to optimize

  • mode (str) – Whether metric is minimized (“min”) or maximized (“max”)

  • random_seed (int) – Different for different repetitions

  • resource_attr (str) – Name of resource attribute

  • max_resource_attr (Optional[str]) – Name of max_resource_value in config_space. One of max_resource_attr, max_t is mandatory

  • scheduler_kwargs (Optional[Dict[str, Any]]) – If given, overwrites defaults of scheduler arguments

  • transfer_learning_evaluations (Optional[Dict[str, Any]]) – Support for transfer learning. Only for simulator backend experiments right now

  • use_surrogates (bool) – For simulator backend experiments, defaults to False

  • fcnet_ordinal (Optional[str]) – Only for simulator backend and fcnet blackbox. This blackbox is tabulated with finite domains, one of which has irregular spacing. If fcnet_ordinal="none", this is left as categorical, otherwise we use ordinal encoding with kind=fcnet_ordinal.

  • num_gpus_per_trial (int) – Only for local backend and GPU training. Number of GPUs assigned to a trial. This is passed here, because it needs to be written into the configuration space for some benchmarks. Defaults to 1

config_space: Dict[str, Any]
metric: str
mode: str
random_seed: int
resource_attr: str
max_resource_attr: Optional[str] = None
scheduler_kwargs: Optional[Dict[str, Any]] = None
transfer_learning_evaluations: Optional[Dict[str, Any]] = None
use_surrogates: bool = False
fcnet_ordinal: Optional[str] = None
num_gpus_per_trial: int = 1
syne_tune.experiments.baselines.default_arguments(args, extra_args)[source]
Return type:

Dict[str, Any]

syne_tune.experiments.baselines.convert_categorical_to_ordinal(config_space)[source]
Parameters:

config_space (Dict[str, Any]) – Configuration space

Return type:

Dict[str, Any]

Returns:

New configuration space where all categorical domains are replaced by ordinal ones (with kind="equal")

syne_tune.experiments.baselines.convert_categorical_to_ordinal_numeric(config_space, kind, do_convert=None)[source]

Converts categorical domains to ordinal ones, of type kind. This is not done if kind="none", or if do_convert(config_space) == False.

Parameters:
  • config_space (Dict[str, Any]) – Configuration space

  • kind (Optional[str]) – Type of ordinal, or "none"

  • do_convert (Optional[Callable[[Dict[str, Any]], bool]]) – See above. The default is testing for the config space of the fcnet blackbox

Return type:

Dict[str, Any]

Returns:

New configuration space