peal.entrypoints.run_didae¶
DiDAE: Dictionary-based Interpretable Diffusion Autoencoder Explanations.
Entry point for the automated counterfactual workflow. Drives the DiDAE
adaptor in peal/adaptors/didae.py: sweep the sparse-dictionary directions
of a diffusion autoencoder for ones that flip the student predictor, render
and rank the candidate counterfactuals, collect feedback on the false
directions and finetune the student (optionally through CFKD) on them.
Usage:
python run_didae.py \
--config configs/didae_experiments/adaptors/<run>_didae.yaml \
[--<any DiDAEConfig field> value]
Every DiDAEConfig field is exposed as an optional --flag overriding
the YAML value. PEAL_CUDA_SYNC=1 makes CUDA launches synchronous for
debugging.
Reads the adaptor config plus the predictor, data, generator and sparse
dictionary configs it references. Writes into base_dir: config.yaml,
logs/, sweep_results.pt, direction_collages/,
direction_feedback.txt, cfkd_finetuning/ and the corrected student as
model.cpl (and model.onnx). The exit status is 1 when the sweep found
no direction at all.
Functions
Load the |