xnn.gnn.models.matgl_format.convert_directory#

xnn.gnn.models.matgl_format.convert_directory(path, dtype=None)[source]#

Convert a MatGL directory with the converter of its architecture.

Parameters:
  • path (str or pathlib.Path) – The directory, or its model.json or state.pt.

  • dtype (torch.dtype, optional) – The dtype the model is built in, by default the checkpoint’s.

Returns:

The xnn model and the Config that rebuilds it.

Return type:

tuple

Raises:

NotImplementedError – For an architecture without a converter.