peal.entrypoints.evaluate_predictor

Print the accuracy and group accuracies of a trained predictor.

Loads the pickled model (model.cpl, or a state dict that is rebuilt into the architecture through ModelTrainer) and scores it with calculate_test_accuracy from peal/training/trainers.py on the dataloaders of the predictor’s data config.

Invocation:

python evaluate_predictor.py --model_config <predictor.yaml> \
    [--model_path <model.cpl>] [--data_config <data.yaml>] [--partition 2]

--model_path defaults to <model_path>/model.cpl of the predictor config; --data_config swaps in another dataset (e.g. a poisoned test set); --partition selects one split (0 Training, 1 Validation, 2 Test), the default -1 evaluates all three. <PEAL_BASE> prefixes are resolved.

Prints, per split: accuracy, per-group accuracies, group distribution, worst group accuracy and the group average, which always divides by four. Nothing is written to disk; the reproduction scripts capture the output.

Functions

main

Load the model and data config, then print the split accuracies.