Export

metatrain.cli.export.export_model(path: Path | str, output: Path | str, extensions: Path | str = 'extensions/', hf_token: str | None = None, metadata: ModelMetadata | None = None) None[source]

Export a trained model allowing it to make predictions.

This includes predictions within molecular simulation engines. Exported models will be saved with a .pt file ending. If path does not end with this file extensions .pt will be added and a warning emitted.

Parameters:
  • path (Path | str) – path to a model file to be exported

  • output (Path | str) – path to save the model

  • extensions (Path | str) – path to save the extensions

  • hf_token (str | None) – HuggingFace API token to download (private) models from HuggingFace (optional)

  • metadata (ModelMetadata | None) – metadata to be appended to the model

Return type:

None