smac.scenario.scenario

Classes

Scenario([scenario, cmd_options])

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

class smac.scenario.scenario.Scenario(scenario=None, cmd_options=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

write()[source]

Write scenario to self.output_dir/scenario.txt.

Return type

None