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 optimizemode (
str
) – Whethermetric
is minimized (“min”) or maximized (“max”)random_seed (
int
) – Different for different repetitionsresource_attr (
str
) – Name of resource attributemax_resource_attr (
Optional
[str
]) – Name ofmax_resource_value
inconfig_space
. One ofmax_resource_attr
,max_t
is mandatoryscheduler_kwargs (
Optional
[Dict
[str
,Any
]]) – If given, overwrites defaults of scheduler argumentstransfer_learning_evaluations (
Optional
[Dict
[str
,Any
]]) – Support for transfer learning. Only for simulator backend experiments right nowuse_surrogates (
bool
) – For simulator backend experiments, defaults toFalse
fcnet_ordinal (
Optional
[str
]) – Only for simulator backend andfcnet
blackbox. This blackbox is tabulated with finite domains, one of which has irregular spacing. Iffcnet_ordinal="none"
, this is left as categorical, otherwise we use ordinal encoding withkind=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 ifkind="none"
, or ifdo_convert(config_space) == False
.- Parameters:
config_space (
Dict
[str
,Any
]) – Configuration spacekind (
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 thefcnet
blackbox
- Return type:
Dict
[str
,Any
]- Returns:
New configuration space