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:
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:

Tuple[ModelCapabilities, ModelCapabilities]