experiment_runner.main
Entry point for the xai4tsc experiment runner.
Run from the repository root as a module:
python -m experiment_runner.main --conf path/to/config.yaml
Orchestrates the full evaluation pipeline as a nested loop over datasets,
models, explainers, and metrics. Results are saved as metrics.csv files
at three granularity levels (global, per-dataset, per-model) under
results_rel_path.
Attributes
Functions
|
Run a complete XAI evaluation experiment from a YAML configuration file. |
|
Set up experiment as described in the given configuration file. |
Module Contents
- experiment_runner.main.logger
- experiment_runner.main.MASTER_CONFIG
- experiment_runner.main.main(config_path: str, debug: bool = False) int
Run a complete XAI evaluation experiment from a YAML configuration file.
Orchestrates the full pipeline as a nested loop over datasets → models → explainers → metrics. Results are saved as
metrics.csvat three granularity levels (global, per-dataset, per-model) underresults_rel_path.Failures are isolated at the level they occur: a raising metric costs only that metric, a raising explainer only that explainer, and a raising model only that model, so the rest of the dataset’s results are still collected and written.
- Returns:
Total number of failures across all four levels (datasets, models, explainers and metric evaluations).
0means everything configured either completed or was explicitly skipped, so callers can treat a non-zero value as “this run needs attention” (the CLI turns it into a non-zero exit status).- Return type:
int
- experiment_runner.main.initial_setup(config_path: str, debug: bool = False, issues: experiment_runner.config.ConfigIssues | None = None) tuple[dict, logging.Handler]
Set up experiment as described in the given configuration file.
- Parameters:
config_path (str) – Path to the experiment configuration.
debug (bool) – Enable debug-level logging.
issues (ConfigIssues, optional) – Collector for config warnings found here. Deferring them is what gets them into
experiment.log, which does not exist yet at this point.
- Returns:
The extracted configuration and the run-level log handler, which the caller detaches when the run ends.
- Return type:
tuple[dict, logging.Handler]
- experiment_runner.main.parser