peal.entrypoints.run_adaptor¶
Run any PEAL adaptor from its YAML config.
Generic entry point for the model-correction adaptors in peal/adaptors:
the adaptor_type field of the config selects the class (CFKD,
DiDAE, ClArC, GroupDRO, GroupDROv2 or
ProjectionAdaptor) and peal.adaptors.adaptor_factory.get_adaptor
instantiates it. run_cfkd.py and run_didae.py do the same for one
adaptor each, with per-field command-line overrides.
Reads the adaptor config and the predictor, data, generator and explainer
configs it references. Writes whatever the adaptor produces into its
base_dir: config.yaml, logs, per-iteration counterfactual datasets and
the corrected model.cpl.
Example:
python run_adaptor.py --config configs/<experiment>/adaptors/<run>.yaml \
[--seed 0]
--seed overrides the config seed and propagates it to the nested configs.
Functions
Parse |