Merge capabilities¶
- metatensor.models.utils.merge_capabilities.merge_capabilities(old_capabilities: ModelCapabilities, new_capabilities: ModelCapabilities) Tuple[ModelCapabilities, ModelCapabilities] [source]¶
Merge the capabilities of a model with the requested capabilities.
- Parameters:
old_capabilities (ModelCapabilities) – The old capabilities of the model.
new_capabilities (ModelCapabilities) – The requested capabilities.
- Returns:
The merged capabilities and the “novel” capabilities that were not present in the old capabilities, but are present in the new capabilities. The order is preserved, both in the merged and novel capabilities.
- Return type: