Evaluating a Trained Model#

After training, use enerzyme predict to run inference on a test set and report metrics. The reference config is enerzyme/config/predict.yaml.

Basic command#

enerzyme predict -c predict.yaml -o results/ -m model_dir/ -mc train.yaml

Arguments:

  • -c / --config_path — prediction config (test Datahub, optional Metric)

  • -m / --model_dir — directory containing trained checkpoints (from enerzyme train -o)

  • -mc / --model_config_path — training config used to build the model (defaults to model_dir/config.yaml if omitted)

  • -o / --output_dir — where CSV summaries and per-model pickles are written

Configuration#

Prediction YAML overrides the training Datahub for an external test set while keeping transforms and neighbor-list settings consistent with training.

Datahub:
    data_path: "test.pkl"
    data_format: pickle
    features:
        Ra: coord
        Za: atom_type
        Q:
        N:
    preload: true
    targets:
        E: energy
        Fa: grad
        Qa: chrg
        M2: dipole
Metric:
    E:
        rmse: 1
    Fa:
        rmse: 52.917721
Trainer:
    non_target_features:
        - E_var
        - Qa_var

Key points:

  • data_path — external test set; if omitted, data comes from the training config

  • Metric — overrides per-model metrics from training for this evaluation

  • non_target_features — extra outputs saved to prediction pickles (e.g. committee uncertainty E_var, Qa_var when using shallow ensembles)

Simple prediction mode#

For inference only (no metric reporting), pass --simple_predict:

enerzyme predict -c predict.yaml -o results/ -m model_dir/ -mc train.yaml -s

Outputs#

Enerzyme loads all active models from the model config, runs prediction, and writes:

  • Per-model prediction pickles under each model subfolder in output_dir

  • A summary CSV in output_dir with aggregated metrics when Metric is defined

Note

Uncertainty fields require a committee-trained model or another UQ-capable setup. See Active Learning for Neural Network Potentials.

Next steps#