cave.reader.smac2_reader module

class cave.reader.smac2_reader.SMAC2Reader(folder, ta_exec_dir)[source]

Bases: cave.reader.base_reader.BaseReader

Reader for SMAC2-output. The expected output-structure in the specified folder is:

self.folder/
smac-output/
aclib/
state-run1/
  • scenario.txt # scenario
  • runs_and_results(…).csv # runhistory
  • paramstrings(…).csv # runhistory
  • traj-run-(…) # trajectory
validate-time-train/ # optional, if validation has been beformed
  • validationCallStrings(…).csv
  • validationRunResultLineMatrix(…).csv
validate-time-test/ # optional, if validation has been beformed
  • validationCallStrings(…).csv
  • validationRunResultLineMatrix(…).csv
get_runhistory(cs)[source]

Expects the following files:

  • self.folder/smac-output/aclib/state-run1/runs_and_results(…).csv
  • self.folder/smac-output/aclib/state-run1/paramstrings(…).csv
Returns:rh – runhistory
Return type:RunHistory
get_scenario()[source]

Expects self.folder/scenario.txt with appropriately formatted scenario-information ( https://automl.github.io/SMAC3/stable/options.html#scenario)

get_trajectory(cs)[source]

Expects the following files:

  • self.folder/smac-output/aclib/state-run1/traj-run-(…).csv
get_validated_runhistory(cs)[source]

Expects the following files:

  • self.folder/validate-time-train/validationCallStrings(…).csv
  • self.folder/validate-time-train/validationRunResultLineMatrix(…).csv
  • self.folder/validate-time-test/validationCallStrings(…).csv
  • self.folder/validate-time-test/validationRunResultLineMatrix(…).csv
Returns:validated_rh – validated runhistory
Return type:RunHistory