Changelog¶
All notable changes to metatensor-torch are documented here, following the keep a changelog format. This project follows Semantic Versioning.
Unreleased¶
Changed¶
MetatensorAtomisticModel.save()always saves models on the CPU.We now require Python >= 3.9
Version 0.5.2 - 2024-06-21¶
Added¶
MetatensorAtomisticModel.save()to save a wrapped model to a file.TensorBlock.__len__andTensorBlock.shape, which return the length and shape of the values in the block respectively (#640)metatensor.torch.atomistic.ase_calculator.MetatensorCalculatorcan now usevesinfor faster neighbor list calculations (#659)When running atomistic models in the PyTorch profiler, different sections of the code now have meaningful names
Deprecated¶
MetatensorAtomisticModel.export()is deprecated in favor ofMetatensorAtomisticModel.save()
Fixed¶
metatensor.torch.atomistic.ase_calculator.MetatensorCalculatoruses the right device when computing stress/virial (#660)
Version 0.5.1 - 2024-05-14¶
Added¶
preprocessor macros containing the version number of metatensor-torch:
METATENSOR_TORCH_VERSION,METATENSOR_TORCH_VERSION_MAJOR,METATENSOR_TORCH_VERSION_MINOR, andMETATENSOR_TORCH_VERSION_PATCH.
Version 0.5.0 - 2024-05-02¶
Changed¶
We renamed
neighbors_listtoneighbor_listin all functions (#587)
metatensor-torch Python¶
Changed¶
The neighbor lists calculation in
MetatensorCalculator(ASE calculator based on metatensor models) is now a lot faster (#586)Multiple small improvements related to custom TorchScript extensions (#584)
There are reference output for neighbor list calculations, which should help writing interfaces to metatensor models in new simulation engines (#588)
The wheels for
metatensor-torchon PyPI now declare which versions of torch they are compatible with (#592)
Version 0.4.0 - 2024-04-11¶
metatensor-torch C++¶
Added¶
ModelCapabilities::dtype, used by the model to communicate the dtype it wants to use for inputs and outputs.The
load_model_extensions()function to facilitate loading a model using TorchScript extensions.
Changed¶
System::add_datanow has anoverrideparameter to replace custom data with a new value.
metatensor-torch Python¶
Changed¶
We now release wheels compatible with multiple torch versions on PyPI, removing the need to compile C++ code when installing this package.
Added¶
ModelCapabilities.dtype, used by the model to communicate the dtype it wants to use for inputs and outputs.The
devicethat should be used by a model inside the ASE’sMetatensorCalculatorcan now be specified by the user.The
load_model_extensions()andload_atomistic_modelfunctions to facilitate loading a model using TorchScript extensions
Version 0.3.0 - 2024-03-01¶
metatensor-torch C++¶
Added¶
ModelMetadatato record metadata about a specific model such as it’s name, authors, etc.Added
interaction_rangeandsupported_devicestoModelCapabilities
Changed¶
System::specieshas been renamed toSystem::types.
metatensor-torch Python¶
Added¶
ModelMetadatato record metadata about a specific model such as it’s name, authors, etc.Added
interaction_rangeandsupported_devicestoModelCapabilities
Changed¶
System.specieshas been renamed toSystem.types.
Version 0.2.1 - 2024-01-26¶
metatensor-torch C++¶
Added¶
Offer serialization functionality as member functions (i.e.
TensorMap::load) in addition to the existing free standing functions (i.e.metatensor_torch::load) (#453)In-memory serialization with
TensorMap::save_buffer,TensorMap::load_buffer, and the respective free standing functions (#455)Serialization of Labels, with the same API as
TensorMap(#455)
metatensor-torch Python¶
Added¶
Offer serialization functionality as member functions (i.e.
TensorMap.load) in addition to the existing free standing functions (i.e.metatensor.torch.load) (#453)In-memory serialization with
TensorMap.save_buffer,TensorMap.load_buffer, and the respective free standing functions (#455)Serialization of Labels, with the same API as
TensorMap(#455)
Version 0.2.0 - 2024-01-08¶
metatensor-torch C++¶
Added¶
New classes specifically tailored for atomistic models (#405):
Systemdefines the input of a model;NeighborsListOptionsallow a model to request a specific neighbors list;ModelRunOptions,ModelOutputandModelCapabilitiesallow to statically describe capabilities of a model, and request specific outputs from it.
TensorBlock::to,TensorMap::to, andSystem::toto change the device or dtype of torch Tensor stored by metatensorLabels::device,TensorBlock::deviceandTensorMap::device; as well asTensorMap::scalar_type, andTensorBlock::scalar_typeto query the current device and scalar type/dtype used by the data.metatensor_torch::versionfunction, returning the version of the code as a string.
Fixed¶
We now check that all tensors in a
TensorBlock/TensorMaphave the same dtype and device (#414)keys_to_properties,keys_to_samplesandcomponents_to_propertiesnow keep the different Labels on the same device (#411)
metatensor-torch Python¶
Added¶
New classes specifically tailored for atomistic models (#405):
same classes as the C++ interfaces, in
metatensor.torch.atomisticMetatensorAtomisticModelas a way to wrap user-definedtorch.nn.Moduleand export them in a unified way, handling unit conversions and metadata checks.
ASE calculator based on
MetatensorAtomisticModelinmetatensor.torch.atomistic.ase_calculator. This allow using arbitrary user-defined models to run simulations with ASE.TensorBlock.to,TensorMap.toandSystem.toto change the device or dtype of torch Tensor stored by metatensorLabels.device,TensorBlock.deviceandTensorMap.device; as well asTensorMap.dtype, andTensorBlock.dtypeto query the current device and dtype used by the data.
Version 0.1.0 - 2023-10-11¶
metatensor-torch C++¶
Added¶
TorchScript bindings to all metatensor-core class:
Labels,LabelsEntry,TensorBlock, andTensorMap;Implementation of
mts_array_t/metatensor::DataArrayBasefortorch::Tensor;
metatensor-torch Python¶
Added¶
Expose TorchScript classes to Python;
Expose all functions from
metatensor-operationsas TorchScript compatible code;