cave.reader.base_reader module

class cave.reader.base_reader.BaseReader(folder, ta_exec_dir)[source]

Bases: object

Abstract base class to inherit reader from. Reader load necessary objects (scenario, runhistory, trajectory) from files for different formats.

Please note that it is strongly encouraged to build a converter (from BaseConverter ) instead of designing a new reader. Conversion aims to make it easy and feasible to quickly support new file-formats.

classmethod check_for_files(path)[source]
classmethod get_glob_file(folder, fn, raise_on_failure=True)[source]

If a file is not found in the expected path structure, we can check if it’s unique in the subfolders and if so, return it.

get_runhistory(config_space)[source]

Create RunHistory-object from files.

get_scenario()[source]

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

get_trajectory(config_space)[source]

Create trajectory (list with dicts as entries)

get_validated_runhistory(config_space)[source]

Create validated runhistory from files, if available.

cave.reader.base_reader.changedir(newdir)[source]