lir.main module
- lir.main.copy_yaml_definition(output_dir: Path, config_yaml_path: Path) None[source]
Copy the YAML definition for a given LR system experiment to persist the used configuration.
- Parameters:
output_dir (Path) – The directory where the YAML definition should be copied.
config_yaml_path (Path) – The path to the YAML file describing the experiment configuration.
- lir.main.error(msg: str, e: Exception | None = None) None[source]
Stop execution with given error message or raise exception.
- Parameters:
msg (str) – The error message to be printed to stderr.
e (Exception | None) – The exception to be raised, or None to not raise an exception.
- lir.main.initialize_experiments(cfg: Configuration) tuple[Mapping[str, Experiment], Path][source]
Extract which Experiment to run as dictated in the configuration.
The following pre-defined variables are injected to the configuration:
timestamp: a formatted timestamp of the current date/time
- Parameters:
cfg (confidence.Configuration) – A Configuration object describing the experiments.
- Returns:
A tuple with two elements: (1) mapping of names to experiments; (2) path to output directory.
- Return type:
tuple[Mapping[str, Experiment], Path]
- lir.main.initialize_logfile(output_dir: Path) None[source]
Set up logfile for debugging purposes when running experiment.
- Parameters:
output_dir (Path) – The directory where the logfile should be created.