smac.utils.io.output_writer

Classes

OutputWriter()

Writing scenario to file.

class smac.utils.io.output_writer.OutputWriter[source]

Bases: object

Writing scenario to file.

save_configspace(cs, fn, output_format)[source]

Writing ConfigSpace to file.

Parameters
  • cs (ConfigurationSpace) – Config-space to be written

  • fn (str) – Output-file-path

  • output_format (str) – Output format of the configuration space file. Currently, json and pcs_new are supported.

Return type

None

write_inst_features_file(n_features, feat_dict, fn)[source]

Writes features to file.

Parameters
  • n_features (int) – Number of features

  • feat_dict (dict) – Features to be written

  • fn (string) – File name of instance feature file

Return type

None

write_inst_file(insts, fn)[source]

Writes instance-list to file.

Parameters
  • insts (list<string>) – Instance list to be written

  • fn (string) – Output path

Return type

None

write_scenario_file(scenario)[source]

Write scenario to a file (format is compatible with input_reader). Will overwrite if file exists. If you have arguments that need special parsing when saving, specify so in the _parse_argument-function. Creates output-dir if necessesary.

Parameters

scenario (Scenario) – Scenario to be written to file

Returns

status – False indicates that writing process failed

Return type

False or None