smac.scenario.scenario module

class smac.scenario.scenario.Scenario(scenario: Optional[Union[str, Dict]] = None, cmd_options: Optional[Dict] = None)[source]

Bases: object

Scenario contains the configuration of the optimization process and constructs a scenario object from a file or dictionary.

All arguments set in the Scenario are set as attributes.

Creates a scenario-object. The output_dir will be “output_dir/run_id/” and if that exists already, the old folder and its content will be moved (without any checks on whether it’s still used by another process) to “output_dir/run_id.OLD”. If that exists, “.OLD”s will be appended until possible.

Parameters
  • scenario (str or dict or None) – If str, it will be interpreted as to a path a scenario file If dict, it will be directly to get all scenario related information If None, only cmd_options will be used

  • cmd_options (dict) – Options from parsed command line arguments

_to_str_and_warn(list_: List[Any]) → List[Any][source]
_transform_arguments() → None[source]

TODO

feature_dict: typing.Dict[str, np.ndarray] = {}
run_obj = 'None'
use_ta_time = True
write() → None[source]

Write scenario to self.output_dir/scenario.txt.