Eval

metatrain.cli.eval.eval_model(model: AtomisticModel | RecursiveScriptModule, options: DictConfig, output: Path | str = 'output.xyz', batch_size: int | None = None, check_consistency: bool = False, append: bool | None = None, warm_up: bool = True) → None[source]

Evaluate an exported model on a given data set.

If options contains a targets sub-section, RMSE values will be reported. If this sub-section is missing, only a xyz-file with containing the properties the model was trained against is written.

Parameters:
  • model (AtomisticModel | RecursiveScriptModule) – Saved model to be evaluated.

  • options (DictConfig) – DictConfig to define a test dataset taken for the evaluation.

  • output (Path | str) – Path to save the predicted values. A path ending in a path separator (e.g. "predictions/") writes a memmap dataset directory instead of a single file.

  • batch_size (int | None) – Batch size for evaluation. When measuring the equivariance error, this is also the number of rotated copies of a system evaluated in a single call to the model. If None, 16 if any dataset measures the equivariance error, and 1 otherwise.

  • check_consistency (bool) – Whether to run consistency checks during model evaluation.

  • append (bool | None) – If True, open the output file in append mode.

  • warm_up (bool) – Whether to do a warm-up of the model before evaluation.

Return type:

None