peal.entrypoints¶
Command-line entry points of PEAL.
This package holds the modules behind PEAL’s commands: running the adaptors
(run_cfkd, run_didae, run_adaptor), the explainers
(run_explainer), the training and evaluation scripts
(train_generator, train_predictor, train_distilled_predictor,
evaluate_predictor), the sparse-dictionary analyses
(run_sae_analysis, run_component_analysis), the dataset generator
(generate_dataset) and the config check (preflight).
Each module keeps a main() that takes no arguments and parses sys.argv
itself, so it can be exposed as a console_scripts entry point of an
installed PEAL.
The files of the same name in the repository root are thin wrappers that
import main from here. They are kept because the reproduction scripts, the
notebooks and the README all invoke the tools as python <script>.py ....
Submodules
Print the accuracy and group accuracies of a trained predictor. |
|
Generate a synthetic confounded dataset from a |
|
Check run configs before spending GPU time on them. |
|
Run any PEAL adaptor from its YAML config. |
|
Run Counterfactual Knowledge Distillation (CFKD) from a YAML config. |
|
Visualise every component of a sparse dictionary fitted on a generator. |
|
DiDAE: Dictionary-based Interpretable Diffusion Autoencoder Explanations. |
|
Explain a trained predictor with a stand-alone explainer run. |
|
Fit or load a sparse dictionary on a generator's latents and evaluate it. |
|
Distil a trained predictor into a smoother surrogate for counterfactuals. |
|
Train a PEAL generator (DDPM, diffusion autoencoder, RAE, ...) from YAML. |
|
Train a predictor (student or test model) from a |