From 2da11ce68d9206d903067e6c29ce85d560756233 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Fri, 1 May 2026 14:04:52 +0200 Subject: [PATCH 01/25] Use targetinfo quantity as modeloutput quantity was deprecated --- src/metatrain/utils/evaluate_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metatrain/utils/evaluate_model.py b/src/metatrain/utils/evaluate_model.py index 6a0bb0006b..0308bcb972 100644 --- a/src/metatrain/utils/evaluate_model.py +++ b/src/metatrain/utils/evaluate_model.py @@ -62,7 +62,7 @@ def evaluate_model( energy_targets_that_require_strain_gradients = [] for target_name in targets.keys(): # Check if the target is an energy: - if model_outputs[target_name].quantity == "energy": + if targets[target_name].quantity == "energy": energy_targets.append(target_name) if isinstance(targets[target_name], TargetInfo): # Check if the energy requires gradients: From 903841ef784927851af8e444f28e778d646ae7d6 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Tue, 12 May 2026 11:40:30 +0200 Subject: [PATCH 02/25] is_auxiliary_output - also match singular "feature" --- src/metatrain/utils/data/target_info.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/metatrain/utils/data/target_info.py b/src/metatrain/utils/data/target_info.py index 9ba103ff52..47feaea5ea 100644 --- a/src/metatrain/utils/data/target_info.py +++ b/src/metatrain/utils/data/target_info.py @@ -758,7 +758,10 @@ def is_auxiliary_output(name: str) -> bool: :return: `True` if the target is an auxiliary output, `False` otherwise. """ is_auxiliary = ( - name == "features" or name == "energy_ensemble" or name.startswith("mtt::aux::") + name == "features" + or name == "feature" + or name == "energy_ensemble" + or name.startswith("mtt::aux::") ) return is_auxiliary From a66b3f5580c56976654b431edc45d04a6caf6c39 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Mon, 11 May 2026 23:26:11 +0200 Subject: [PATCH 03/25] gap: recreate tensorblocks --- src/metatrain/gap/model.py | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/metatrain/gap/model.py b/src/metatrain/gap/model.py index 51b5815d80..ee83451b9d 100644 --- a/src/metatrain/gap/model.py +++ b/src/metatrain/gap/model.py @@ -243,9 +243,17 @@ def forward( for idx_key in range(len(self._species_labels)): key = self._species_labels.entry(idx_key) if soap_features.keys.position(key) is not None: - new_blocks.append(soap_features.block(key)) + block = soap_features.block(key) + new_blocks.append( + TensorBlock( + values=block.values, + samples=block.samples, + components=block.components, + properties=block.properties, + ) + ) else: - new_blocks.append(dummyblock) + new_blocks.append(dummyblock.copy()) soap_features = TensorMap(keys=self._species_labels, blocks=new_blocks) soap_features = soap_features.keys_to_samples("center_type") # here, we move to properties to use metatensor operations to aggregate @@ -254,7 +262,18 @@ def forward( soap_features = soap_features.keys_to_properties( ["neighbor_1_type", "neighbor_2_type"] ) - soap_features = TensorMap(self._keys, soap_features.blocks()) + soap_features = TensorMap( + self._keys, + [ + TensorBlock( + values=block.values, + samples=block.samples, + components=block.components, + properties=block.properties, + ) + for block in soap_features.blocks() + ], + ) output_key = list(outputs.keys())[0] energies = self._subset_of_regressors_torch(soap_features) return_dict = {output_key: energies} From f0d92ea38cc25380390c83f942a0b5ec8bf189e2 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Mon, 11 May 2026 23:31:02 +0200 Subject: [PATCH 04/25] copy blocks --- src/metatrain/experimental/flashmd/model.py | 2 +- src/metatrain/experimental/flashmd_symplectic/model.py | 2 +- src/metatrain/experimental/mace/model.py | 2 +- src/metatrain/experimental/phace/model.py | 2 +- src/metatrain/soap_bpnn/model.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/metatrain/experimental/flashmd/model.py b/src/metatrain/experimental/flashmd/model.py index d20826f517..08711d1d55 100644 --- a/src/metatrain/experimental/flashmd/model.py +++ b/src/metatrain/experimental/flashmd/model.py @@ -588,7 +588,7 @@ def forward( ) ) else: - output_blocks.append(b) + output_blocks.append(b.copy()) return_dict[name] = TensorMap( return_dict[name].keys, output_blocks ) diff --git a/src/metatrain/experimental/flashmd_symplectic/model.py b/src/metatrain/experimental/flashmd_symplectic/model.py index 959e288b82..d56005073e 100644 --- a/src/metatrain/experimental/flashmd_symplectic/model.py +++ b/src/metatrain/experimental/flashmd_symplectic/model.py @@ -643,7 +643,7 @@ def forward( ) ) else: - output_blocks.append(b) + output_blocks.append(b.copy()) return_dict[name] = TensorMap( return_dict[name].keys, output_blocks ) diff --git a/src/metatrain/experimental/mace/model.py b/src/metatrain/experimental/mace/model.py index 31ce13d763..758af4c0cf 100644 --- a/src/metatrain/experimental/mace/model.py +++ b/src/metatrain/experimental/mace/model.py @@ -528,7 +528,7 @@ def add_additive_contributions( ) ) else: - output_blocks.append(b) + output_blocks.append(b.copy()) values[name] = TensorMap(values[name].keys, output_blocks) def supported_outputs(self) -> Dict[str, ModelOutput]: diff --git a/src/metatrain/experimental/phace/model.py b/src/metatrain/experimental/phace/model.py index 6982fb882d..b44cade121 100644 --- a/src/metatrain/experimental/phace/model.py +++ b/src/metatrain/experimental/phace/model.py @@ -513,7 +513,7 @@ def forward( ) ) else: - output_blocks.append(b) + output_blocks.append(b.copy()) return_dict[name] = TensorMap(return_dict[name].keys, output_blocks) # For atomic basis targets, sparsify to create blocks with "atom_type" diff --git a/src/metatrain/soap_bpnn/model.py b/src/metatrain/soap_bpnn/model.py index 48a175b392..694661122e 100644 --- a/src/metatrain/soap_bpnn/model.py +++ b/src/metatrain/soap_bpnn/model.py @@ -865,7 +865,7 @@ def forward( ) ) else: - output_blocks.append(b) + output_blocks.append(b.copy()) return_dict[name] = TensorMap(return_dict[name].keys, output_blocks) # For atomic basis targets, sparsify to create blocks with "atom_type" From 3098dfd424da36ad4983f8498e2731f5b17a0103 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Mon, 11 May 2026 23:23:26 +0200 Subject: [PATCH 05/25] update tests for stricter validation --- src/metatrain/utils/testing/output.py | 4 ++-- tests/utils/data/test_readers.py | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/metatrain/utils/testing/output.py b/src/metatrain/utils/testing/output.py index 967e3e6fee..68a911cf4f 100644 --- a/src/metatrain/utils/testing/output.py +++ b/src/metatrain/utils/testing/output.py @@ -627,7 +627,7 @@ def test_output_features( features_output_options = ModelOutput( quantity="", - unit="unitless", + unit="", per_atom=per_atom, ) model = model.to(system.positions.dtype) @@ -705,7 +705,7 @@ def test_output_last_layer_features( # last-layer features per atom: ll_output_options = ModelOutput( quantity="", - unit="unitless", + unit="", per_atom=per_atom, ) model = model.to(system.positions.dtype) diff --git a/tests/utils/data/test_readers.py b/tests/utils/data/test_readers.py index 16424387da..51cc48e351 100644 --- a/tests/utils/data/test_readers.py +++ b/tests/utils/data/test_readers.py @@ -52,9 +52,7 @@ def test_read_unknonw_library(): def test_unsupported_target_name(): conf = {"free_energy": {"quantity": "energy"}} - with pytest.raises( - ValueError, match="Invalid name for model output: 'free_energy'" - ): + with pytest.raises(ValueError, match="invalid model output name 'free_energy'"): read_targets(OmegaConf.create(conf)) From ecb59c2c5ca641f328e01b0e1070124b19d1f53f Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Tue, 12 May 2026 13:44:49 +0200 Subject: [PATCH 06/25] scaler: copy block before second tensormap --- src/metatrain/utils/scaler/_base_scaler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/metatrain/utils/scaler/_base_scaler.py b/src/metatrain/utils/scaler/_base_scaler.py index 0584fd17d0..ad69e133b7 100644 --- a/src/metatrain/utils/scaler/_base_scaler.py +++ b/src/metatrain/utils/scaler/_base_scaler.py @@ -831,11 +831,11 @@ def _set_fixed_weights( self.scales[target_name] = TensorMap( self.Y2[target_name].keys.to(device=block.values.device), - [block], + [block.copy()], ) self.per_target_scales[target_name] = TensorMap( self.Y2[target_name].keys.to(device=block.values.device), - [block], + [block.copy()], ) def _sync_device_dtype(self, device: torch.device, dtype: torch.dtype) -> None: From 74c798f15317b9a1c849df45515da0c48c07da9c Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Tue, 12 May 2026 14:15:38 +0200 Subject: [PATCH 07/25] revert regex for backward compat with current metatomic --- tests/utils/data/test_readers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/utils/data/test_readers.py b/tests/utils/data/test_readers.py index 51cc48e351..16424387da 100644 --- a/tests/utils/data/test_readers.py +++ b/tests/utils/data/test_readers.py @@ -52,7 +52,9 @@ def test_read_unknonw_library(): def test_unsupported_target_name(): conf = {"free_energy": {"quantity": "energy"}} - with pytest.raises(ValueError, match="invalid model output name 'free_energy'"): + with pytest.raises( + ValueError, match="Invalid name for model output: 'free_energy'" + ): read_targets(OmegaConf.create(conf)) From bd7d3e52fa84bfe674386e51e30934acb90a9448 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Fri, 15 May 2026 17:24:49 +0200 Subject: [PATCH 08/25] update regex for metatensor 0.9 validation message --- tests/utils/data/test_readers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/utils/data/test_readers.py b/tests/utils/data/test_readers.py index 16424387da..b8f953f800 100644 --- a/tests/utils/data/test_readers.py +++ b/tests/utils/data/test_readers.py @@ -53,7 +53,8 @@ def test_read_unknonw_library(): def test_unsupported_target_name(): conf = {"free_energy": {"quantity": "energy"}} with pytest.raises( - ValueError, match="Invalid name for model output: 'free_energy'" + ValueError, + match="invalid model output name 'free_energy': this is not a known quantity", ): read_targets(OmegaConf.create(conf)) From bca162f2383805a9c3bd161a84f82aa3d98b0ef3 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Fri, 15 May 2026 17:31:43 +0200 Subject: [PATCH 09/25] bump metatensor to 0.9, metatomic to 0.1.12 --- pyproject.toml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f2812edaa6..6e64183db3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,11 +12,11 @@ dependencies = [ "ase", "huggingface_hub", "numpy", - "metatensor-learn >=0.4.0,<0.5", - "metatensor-operations >=0.4.0,<0.5", - "metatensor-torch >=0.8.2,<0.9", - "metatomic-torch >=0.1.8,<0.2", - "metatomic-ase >=0.1.0,<0.2", + "metatensor-learn >=0.5.0,<0.6", + "metatensor-operations >=0.5.0,<0.6", + "metatensor-torch >=0.9.0,<0.10", + "metatomic-torch >=0.1.12,<0.2", + "metatomic-ase >=0.1.1,<0.2", "jsonschema", "pydantic >= 2.12", # Because of passing arguments to validator functions "typing_extensions", # For python < 3.12 typing.TypedDict has limited functionality @@ -70,7 +70,7 @@ soap-bpnn = [ ] pet = [] gap = [ - "featomic-torch >=0.7,<0.8", + "featomic-torch >=0.7.4rc2,<0.8", "skmatter", "scipy", ] @@ -180,6 +180,8 @@ filterwarnings = [ "ignore:`torch.jit.load` is deprecated. Please switch to `torch.export`:DeprecationWarning", "ignore:`torch.jit.trace_method` is deprecated. Please switch to `torch.compile` or `torch.export`:DeprecationWarning", "ignore:`torch.jit.trace` is deprecated. Please switch to `torch.compile` or `torch.export`:DeprecationWarning", + "ignore:`torch.jit.interface` is deprecated. Please use `torch.compile` instead.:DeprecationWarning", + "ignore:`torch.jit.set_fusion_strategy` is deprecated. Please use `torch.compile` instead.:DeprecationWarning", # PyTorch does not want these, but mypy requires them "ignore:The TorchScript type system doesn't support instance-level annotations on empty non-base types", # Sphericart double backward warning @@ -196,7 +198,19 @@ filterwarnings = [ # MACE warning with newer versions of pytorch (because they use e3nn==0.4.4) "ignore:Environment variable TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD detected, since the`weights_only` argument was not explicitly passed:UserWarning", # vesin.metatomic deprecation - "ignore:`compute_requested_neighbors_from_options` is deprecated and will be removed in a future version:UserWarning" + "ignore:`compute_requested_neighbors_from_options` is deprecated and will be removed in a future version:UserWarning", + # metatomic 0.1.12 deprecations + "ignore:the 'features' output name is deprecated:UserWarning", + "ignore:the 'features' quantity is deprecated:UserWarning", + "ignore:the 'features' quantity is deprecated:DeprecationWarning", + "ignore:the 'non_conservative_forces' output name is deprecated:UserWarning", + "ignore:the 'momenta' quantity is deprecated:DeprecationWarning", + "ignore:the 'positions' quantity is deprecated:DeprecationWarning", + "ignore:the 'masses' quantity is deprecated:DeprecationWarning", + "ignore:the 'velocities' quantity is deprecated:DeprecationWarning", + "ignore:the 'charges' quantity is deprecated:DeprecationWarning", + "ignore:`per_atom` is deprecated:DeprecationWarning", + "ignore:ModelOutput.quantity is deprecated:DeprecationWarning" ] addopts = ["-p", "mtt_plugin"] pythonpath = "src/metatrain/utils/testing" From 88c4c1b1d7788de31e0e3f5449c7e7e55f7cca7b Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Fri, 15 May 2026 17:42:33 +0200 Subject: [PATCH 10/25] add featomic rc --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 6e64183db3..af98b18aaa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,6 +70,7 @@ soap-bpnn = [ ] pet = [] gap = [ + "featomic >=0.6.6rc1,<0.7", "featomic-torch >=0.7.4rc2,<0.8", "skmatter", "scipy", From 09413467090969080ba6b73f45e5b1f96c4094b0 Mon Sep 17 00:00:00 2001 From: Pol Febrer Calabozo <42074085+pfebrer@users.noreply.github.com> Date: Mon, 18 May 2026 11:51:44 +0200 Subject: [PATCH 11/25] Update gap extras --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index af98b18aaa..799858549c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,8 +70,8 @@ soap-bpnn = [ ] pet = [] gap = [ - "featomic >=0.6.6rc1,<0.7", - "featomic-torch >=0.7.4rc2,<0.8", + "featomic >=0.6.6,<0.7", + "featomic-torch >=0.7.4,<0.8", "skmatter", "scipy", ] From ed438ad8ac95252bcf776fdab80a24e0fbc1a673 Mon Sep 17 00:00:00 2001 From: Pol Febrer Calabozo <42074085+pfebrer@users.noreply.github.com> Date: Mon, 18 May 2026 18:35:29 +0200 Subject: [PATCH 12/25] Remove the extra dependency for gap Removed version constraint for 'featomic' package. --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 799858549c..409f741fe4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,6 @@ soap-bpnn = [ ] pet = [] gap = [ - "featomic >=0.6.6,<0.7", "featomic-torch >=0.7.4,<0.8", "skmatter", "scipy", From 132446c6d023d04eae3e9257f6e3f57b9317d84a Mon Sep 17 00:00:00 2001 From: Pol Febrer Calabozo <42074085+pfebrer@users.noreply.github.com> Date: Tue, 19 May 2026 08:35:37 +0200 Subject: [PATCH 13/25] Pin sphericart on windows --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 409f741fe4..9f35536965 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,8 @@ dependencies = [ "omegaconf >= 2.3.0", "python-hostlist", "tqdm", - "vesin >= 0.5.2" # Because of https://github.com/Luthaf/vesin/pull/119, + "vesin >= 0.5.2", # Because of https://github.com/Luthaf/vesin/pull/119, + 'sphericart-torch == 1.0.8 ; platform_system == "Windows"' ] keywords = ["machine learning", "molecular modeling"] From 40562397e770a865e7e6a27daf1a63a06b94832d Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Tue, 19 May 2026 14:11:56 +0200 Subject: [PATCH 14/25] temporary override metatomic with pr branch --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 9f35536965..6f7ab40b50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -96,6 +96,12 @@ dpa3 = [ [tool.check-manifest] ignore = ["src/metatrain/_version.py"] +[tool.uv] +override-dependencies = [ + "metatomic-torch @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_torch", + "metatomic-ase @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_ase", +] + [tool.setuptools.packages.find] where = ["src"] From 6668d0017f87fcfbeb0de9f2ceddb8d9bc919427 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Tue, 19 May 2026 14:26:25 +0200 Subject: [PATCH 15/25] temporary filter warning for overriding metatomic-torch --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 6f7ab40b50..5385010be6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -206,6 +206,7 @@ filterwarnings = [ "ignore:Environment variable TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD detected, since the`weights_only` argument was not explicitly passed:UserWarning", # vesin.metatomic deprecation "ignore:`compute_requested_neighbors_from_options` is deprecated and will be removed in a future version:UserWarning", + "ignore:Found metatomic.torch.*but vesin.metatomic was only tested:UserWarning", # metatomic 0.1.12 deprecations "ignore:the 'features' output name is deprecated:UserWarning", "ignore:the 'features' quantity is deprecated:UserWarning", From 18d0b6b23a79bc89f753ced1b348bb813908925d Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Tue, 19 May 2026 14:40:16 +0200 Subject: [PATCH 16/25] temporary: attempt to add cpu torch index --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 5385010be6..358a038291 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,6 +97,7 @@ dpa3 = [ ignore = ["src/metatrain/_version.py"] [tool.uv] +extra-index-url = ["https://download.pytorch.org/whl/cpu"] override-dependencies = [ "metatomic-torch @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_torch", "metatomic-ase @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_ase", From 235920490013802690df11bbb9d90fcecaef0336 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Tue, 19 May 2026 14:51:03 +0200 Subject: [PATCH 17/25] temporary: another attempr to use cpu torch index --- pyproject.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 358a038291..68a81a3a9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,12 +97,19 @@ dpa3 = [ ignore = ["src/metatrain/_version.py"] [tool.uv] -extra-index-url = ["https://download.pytorch.org/whl/cpu"] override-dependencies = [ "metatomic-torch @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_torch", "metatomic-ase @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_ase", ] +[[tool.uv.index]] +name = "pytorch-cpu" +url = "https://download.pytorch.org/whl/cpu" +explicit = true + +[tool.uv.sources] +torch = { index = "pytorch-cpu" } + [tool.setuptools.packages.find] where = ["src"] From 449c92575d14f3270ececeec24e155fa04953436 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Tue, 19 May 2026 16:57:41 +0200 Subject: [PATCH 18/25] another try on cpu torch from GF --- pyproject.toml | 8 -------- tox.ini | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 68a81a3a9b..5385010be6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,14 +102,6 @@ override-dependencies = [ "metatomic-ase @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_ase", ] -[[tool.uv.index]] -name = "pytorch-cpu" -url = "https://download.pytorch.org/whl/cpu" -explicit = true - -[tool.uv.sources] -torch = { index = "pytorch-cpu" } - [tool.setuptools.packages.find] where = ["src"] diff --git a/tox.ini b/tox.ini index bb93ed5251..333daa73ab 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ package = wheel wheel_build_env = .pkg passenv = * setenv = - UV_EXTRA_INDEX_URL = {env:PIP_EXTRA_INDEX_URL:} + UV_EXTRA_INDEX_URL = https://download.pytorch.org/whl/cpu UV_INDEX_STRATEGY = unsafe-best-match COVERAGE_FILE = {toxinidir}/.coverage lint_folders = From 8394fd372fcc22d47ed08e98584152778f3df589 Mon Sep 17 00:00:00 2001 From: Guillaume Fraux Date: Tue, 19 May 2026 16:47:51 +0200 Subject: [PATCH 19/25] Another try for CPU torch --- .github/workflows/architecture-tests.yml | 4 +++- .github/workflows/build.yml | 2 ++ .github/workflows/docs.yml | 2 ++ .github/workflows/tests.yml | 4 +++- pyproject.toml | 8 -------- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/architecture-tests.yml b/.github/workflows/architecture-tests.yml index 8be15667d0..f899b1d9b3 100644 --- a/.github/workflows/architecture-tests.yml +++ b/.github/workflows/architecture-tests.yml @@ -22,7 +22,7 @@ jobs: - pet - phace - soap-bpnn - - dpa3 + - dpa3 runs-on: ubuntu-24.04 @@ -48,6 +48,8 @@ jobs: env: # Use the CPU only version of torch when building/running the code PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu + UV_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu + UV_INDEX_STRATEGY: unsafe-best-match - name: upload to codecov.io uses: codecov/codecov-action@v6 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 880abd7a46..7e904cd728 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,3 +28,5 @@ jobs: env: # Use the CPU only version of torch when building/running the code PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu + UV_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu + UV_INDEX_STRATEGY: unsafe-best-match diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8b4ee02fac..77371a9eab 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,6 +30,8 @@ jobs: env: # Use the CPU-only version of torch PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu + UV_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu + UV_INDEX_STRATEGY: unsafe-best-match - name: put documentation in the website run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3992418961..21b7bf72f5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -54,7 +54,9 @@ jobs: env: # Use the CPU only version of torch when building/running the code PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu - # Temporary workaround: avoid the deprecated hf_xet.download_files() path + UV_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu + UV_INDEX_STRATEGY: unsafe-best-match + # Temporary workaround: avoid the deprecated hf_xet.download_files() path # until huggingface_hub switches to the new Xet API. HF_HUB_DISABLE_XET: 1 HUGGINGFACE_TOKEN_METATRAIN: ${{ secrets.HUGGINGFACE_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 68a81a3a9b..5385010be6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,14 +102,6 @@ override-dependencies = [ "metatomic-ase @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_ase", ] -[[tool.uv.index]] -name = "pytorch-cpu" -url = "https://download.pytorch.org/whl/cpu" -explicit = true - -[tool.uv.sources] -torch = { index = "pytorch-cpu" } - [tool.setuptools.packages.find] where = ["src"] From 0b8dfc310e97a4e3c67d922aa85d4af877a6afc3 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Wed, 20 May 2026 13:37:45 +0200 Subject: [PATCH 20/25] temporar: try to fix readthedocs job --- .readthedocs.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.readthedocs.yml b/.readthedocs.yml index 5e41743772..c823b406fa 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -11,7 +11,12 @@ build: tools: python: "3.13" rust: "1.75" + apt_packages: + - cmake jobs: + post_install: + - pip install --force-reinstall --no-deps "metatomic-torch @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_torch" + - pip install --force-reinstall --no-deps "metatomic-ase @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_ase" pre_build: - set -e && for f in $(find examples -name '*.sh'); do cd $(dirname $f); bash $(basename $f); cd -; done From 1be8c8f49b41a79912fc2038a2d2e2c65a6f59f2 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Wed, 20 May 2026 13:49:27 +0200 Subject: [PATCH 21/25] point to release candidate or metatomic-torch --- .readthedocs.yml | 4 ++-- pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index c823b406fa..35f7512f10 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -15,8 +15,8 @@ build: - cmake jobs: post_install: - - pip install --force-reinstall --no-deps "metatomic-torch @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_torch" - - pip install --force-reinstall --no-deps "metatomic-ase @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_ase" + - pip install --force-reinstall --no-deps "metatomic-torch @ git+https://github.com/Luthaf/metatomic.git@release-torch-0.1.14#subdirectory=python/metatomic_torch" + - pip install --force-reinstall --no-deps "metatomic-ase @ git+https://github.com/Luthaf/metatomic.git@release-torch-0.1.14#subdirectory=python/metatomic_ase" pre_build: - set -e && for f in $(find examples -name '*.sh'); do cd $(dirname $f); bash $(basename $f); cd -; done diff --git a/pyproject.toml b/pyproject.toml index 5385010be6..3facdf6ca5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,8 +98,8 @@ ignore = ["src/metatrain/_version.py"] [tool.uv] override-dependencies = [ - "metatomic-torch @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_torch", - "metatomic-ase @ git+https://github.com/Luthaf/metatomic.git@create-doc-classes#subdirectory=python/metatomic_ase", + "metatomic-torch @ git+https://github.com/Luthaf/metatomic.git@release-torch-0.1.14#subdirectory=python/metatomic_torch", + "metatomic-ase @ git+https://github.com/Luthaf/metatomic.git@release-torch-0.1.14#subdirectory=python/metatomic_ase", ] [tool.setuptools.packages.find] From 56c397a6f3d4b559e3f8886d92b3cfa92f84305f Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Wed, 20 May 2026 16:31:45 +0200 Subject: [PATCH 22/25] use metatomic-torch 0.1.14 --- .readthedocs.yml | 5 ----- pyproject.toml | 9 +-------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 35f7512f10..5e41743772 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -11,12 +11,7 @@ build: tools: python: "3.13" rust: "1.75" - apt_packages: - - cmake jobs: - post_install: - - pip install --force-reinstall --no-deps "metatomic-torch @ git+https://github.com/Luthaf/metatomic.git@release-torch-0.1.14#subdirectory=python/metatomic_torch" - - pip install --force-reinstall --no-deps "metatomic-ase @ git+https://github.com/Luthaf/metatomic.git@release-torch-0.1.14#subdirectory=python/metatomic_ase" pre_build: - set -e && for f in $(find examples -name '*.sh'); do cd $(dirname $f); bash $(basename $f); cd -; done diff --git a/pyproject.toml b/pyproject.toml index 3facdf6ca5..42d051c82f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ "metatensor-learn >=0.5.0,<0.6", "metatensor-operations >=0.5.0,<0.6", "metatensor-torch >=0.9.0,<0.10", - "metatomic-torch >=0.1.12,<0.2", + "metatomic-torch >=0.1.14,<0.2", "metatomic-ase >=0.1.1,<0.2", "jsonschema", "pydantic >= 2.12", # Because of passing arguments to validator functions @@ -96,12 +96,6 @@ dpa3 = [ [tool.check-manifest] ignore = ["src/metatrain/_version.py"] -[tool.uv] -override-dependencies = [ - "metatomic-torch @ git+https://github.com/Luthaf/metatomic.git@release-torch-0.1.14#subdirectory=python/metatomic_torch", - "metatomic-ase @ git+https://github.com/Luthaf/metatomic.git@release-torch-0.1.14#subdirectory=python/metatomic_ase", -] - [tool.setuptools.packages.find] where = ["src"] @@ -206,7 +200,6 @@ filterwarnings = [ "ignore:Environment variable TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD detected, since the`weights_only` argument was not explicitly passed:UserWarning", # vesin.metatomic deprecation "ignore:`compute_requested_neighbors_from_options` is deprecated and will be removed in a future version:UserWarning", - "ignore:Found metatomic.torch.*but vesin.metatomic was only tested:UserWarning", # metatomic 0.1.12 deprecations "ignore:the 'features' output name is deprecated:UserWarning", "ignore:the 'features' quantity is deprecated:UserWarning", From b7cd29e181fdd5d21bfcc4e27684213676768e79 Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Wed, 20 May 2026 16:49:35 +0200 Subject: [PATCH 23/25] drop cpu torch workarounds --- .github/workflows/architecture-tests.yml | 2 -- .github/workflows/build.yml | 2 -- .github/workflows/docs.yml | 2 -- .github/workflows/tests.yml | 2 -- tox.ini | 2 +- 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/architecture-tests.yml b/.github/workflows/architecture-tests.yml index f899b1d9b3..fc475ef2d9 100644 --- a/.github/workflows/architecture-tests.yml +++ b/.github/workflows/architecture-tests.yml @@ -48,8 +48,6 @@ jobs: env: # Use the CPU only version of torch when building/running the code PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu - UV_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu - UV_INDEX_STRATEGY: unsafe-best-match - name: upload to codecov.io uses: codecov/codecov-action@v6 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e904cd728..880abd7a46 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,5 +28,3 @@ jobs: env: # Use the CPU only version of torch when building/running the code PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu - UV_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu - UV_INDEX_STRATEGY: unsafe-best-match diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 77371a9eab..8b4ee02fac 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,8 +30,6 @@ jobs: env: # Use the CPU-only version of torch PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu - UV_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu - UV_INDEX_STRATEGY: unsafe-best-match - name: put documentation in the website run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 21b7bf72f5..9d6b1abcca 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -54,8 +54,6 @@ jobs: env: # Use the CPU only version of torch when building/running the code PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu - UV_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu - UV_INDEX_STRATEGY: unsafe-best-match # Temporary workaround: avoid the deprecated hf_xet.download_files() path # until huggingface_hub switches to the new Xet API. HF_HUB_DISABLE_XET: 1 diff --git a/tox.ini b/tox.ini index 333daa73ab..bb93ed5251 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ package = wheel wheel_build_env = .pkg passenv = * setenv = - UV_EXTRA_INDEX_URL = https://download.pytorch.org/whl/cpu + UV_EXTRA_INDEX_URL = {env:PIP_EXTRA_INDEX_URL:} UV_INDEX_STRATEGY = unsafe-best-match COVERAGE_FILE = {toxinidir}/.coverage lint_folders = From 86ed229028069eb292b67576a53186da7de9379c Mon Sep 17 00:00:00 2001 From: Sofiia Chorna Date: Wed, 20 May 2026 18:02:41 +0200 Subject: [PATCH 24/25] use block.copy(deep=False) --- src/metatrain/experimental/flashmd/model.py | 2 +- .../experimental/flashmd_symplectic/model.py | 2 +- src/metatrain/experimental/mace/model.py | 2 +- src/metatrain/experimental/phace/model.py | 2 +- src/metatrain/gap/model.py | 21 +++---------------- src/metatrain/soap_bpnn/model.py | 2 +- src/metatrain/utils/additive/remove.py | 11 ++-------- .../utils/data/atomic_basis_helpers.py | 2 +- src/metatrain/utils/evaluate_model.py | 6 +++--- src/metatrain/utils/per_atom.py | 4 ++-- src/metatrain/utils/scaler/_base_scaler.py | 4 ++-- tests/utils/test_metrics.py | 8 +++---- 12 files changed, 22 insertions(+), 44 deletions(-) diff --git a/src/metatrain/experimental/flashmd/model.py b/src/metatrain/experimental/flashmd/model.py index 08711d1d55..ae268a2e1f 100644 --- a/src/metatrain/experimental/flashmd/model.py +++ b/src/metatrain/experimental/flashmd/model.py @@ -588,7 +588,7 @@ def forward( ) ) else: - output_blocks.append(b.copy()) + output_blocks.append(b.copy(deep=False)) return_dict[name] = TensorMap( return_dict[name].keys, output_blocks ) diff --git a/src/metatrain/experimental/flashmd_symplectic/model.py b/src/metatrain/experimental/flashmd_symplectic/model.py index d56005073e..366a575240 100644 --- a/src/metatrain/experimental/flashmd_symplectic/model.py +++ b/src/metatrain/experimental/flashmd_symplectic/model.py @@ -643,7 +643,7 @@ def forward( ) ) else: - output_blocks.append(b.copy()) + output_blocks.append(b.copy(deep=False)) return_dict[name] = TensorMap( return_dict[name].keys, output_blocks ) diff --git a/src/metatrain/experimental/mace/model.py b/src/metatrain/experimental/mace/model.py index 758af4c0cf..bd237dfa40 100644 --- a/src/metatrain/experimental/mace/model.py +++ b/src/metatrain/experimental/mace/model.py @@ -528,7 +528,7 @@ def add_additive_contributions( ) ) else: - output_blocks.append(b.copy()) + output_blocks.append(b.copy(deep=False)) values[name] = TensorMap(values[name].keys, output_blocks) def supported_outputs(self) -> Dict[str, ModelOutput]: diff --git a/src/metatrain/experimental/phace/model.py b/src/metatrain/experimental/phace/model.py index b44cade121..e0db9c7a2c 100644 --- a/src/metatrain/experimental/phace/model.py +++ b/src/metatrain/experimental/phace/model.py @@ -513,7 +513,7 @@ def forward( ) ) else: - output_blocks.append(b.copy()) + output_blocks.append(b.copy(deep=False)) return_dict[name] = TensorMap(return_dict[name].keys, output_blocks) # For atomic basis targets, sparsify to create blocks with "atom_type" diff --git a/src/metatrain/gap/model.py b/src/metatrain/gap/model.py index ee83451b9d..4df1e37904 100644 --- a/src/metatrain/gap/model.py +++ b/src/metatrain/gap/model.py @@ -244,16 +244,9 @@ def forward( key = self._species_labels.entry(idx_key) if soap_features.keys.position(key) is not None: block = soap_features.block(key) - new_blocks.append( - TensorBlock( - values=block.values, - samples=block.samples, - components=block.components, - properties=block.properties, - ) - ) + new_blocks.append(block.copy(deep=False)) else: - new_blocks.append(dummyblock.copy()) + new_blocks.append(dummyblock.copy(deep=False)) soap_features = TensorMap(keys=self._species_labels, blocks=new_blocks) soap_features = soap_features.keys_to_samples("center_type") # here, we move to properties to use metatensor operations to aggregate @@ -264,15 +257,7 @@ def forward( ) soap_features = TensorMap( self._keys, - [ - TensorBlock( - values=block.values, - samples=block.samples, - components=block.components, - properties=block.properties, - ) - for block in soap_features.blocks() - ], + [block.copy(deep=False) for block in soap_features.blocks()], ) output_key = list(outputs.keys())[0] energies = self._subset_of_regressors_torch(soap_features) diff --git a/src/metatrain/soap_bpnn/model.py b/src/metatrain/soap_bpnn/model.py index 694661122e..6212b2a2dd 100644 --- a/src/metatrain/soap_bpnn/model.py +++ b/src/metatrain/soap_bpnn/model.py @@ -865,7 +865,7 @@ def forward( ) ) else: - output_blocks.append(b.copy()) + output_blocks.append(b.copy(deep=False)) return_dict[name] = TensorMap(return_dict[name].keys, output_blocks) # For atomic basis targets, sparsify to create blocks with "atom_type" diff --git a/src/metatrain/utils/additive/remove.py b/src/metatrain/utils/additive/remove.py index d04d4caa20..1b5ff29e41 100644 --- a/src/metatrain/utils/additive/remove.py +++ b/src/metatrain/utils/additive/remove.py @@ -3,7 +3,7 @@ import metatensor.torch as mts import torch -from metatensor.torch import Labels, TensorBlock, TensorMap +from metatensor.torch import Labels, TensorMap from metatensor.torch.operations._add import _add_block_block from metatensor.torch.operations._multiply import _multiply_block_constant from metatomic.torch import System @@ -116,14 +116,7 @@ def remove_additive( ) else: - new_target_blocks.append( - TensorBlock( - values=block.values, - samples=block.samples, - components=block.components, - properties=block.properties, - ) - ) + new_target_blocks.append(block.copy(deep=False)) targets[target_key] = TensorMap( keys=targets[target_key].keys, diff --git a/src/metatrain/utils/data/atomic_basis_helpers.py b/src/metatrain/utils/data/atomic_basis_helpers.py index 626dd3f2a8..e0032a4764 100644 --- a/src/metatrain/utils/data/atomic_basis_helpers.py +++ b/src/metatrain/utils/data/atomic_basis_helpers.py @@ -129,7 +129,7 @@ def _densify_per_atom_atomic_basis_target( properties=existing_block.properties, ) else: - block = layout_block.copy() + block = layout_block.copy(deep=False) assert len(block.samples) == 0 blocks.append(block) diff --git a/src/metatrain/utils/evaluate_model.py b/src/metatrain/utils/evaluate_model.py index 0308bcb972..97883e2db9 100644 --- a/src/metatrain/utils/evaluate_model.py +++ b/src/metatrain/utils/evaluate_model.py @@ -111,7 +111,7 @@ def evaluate_model( destroy_graph=(index == len(energy_targets_with_gradients) - 1), ) old_energy_tensor_map = model_outputs[energy_target] - new_block = old_energy_tensor_map.block().copy() + new_block = old_energy_tensor_map.block().copy(deep=False) new_block.add_gradient( "positions", _position_gradients_to_block(gradients[: len(systems)]) ) @@ -132,7 +132,7 @@ def evaluate_model( destroy_graph=(index == len(energy_targets_with_gradients) - 1), ) old_energy_tensor_map = model_outputs[energy_target] - new_block = old_energy_tensor_map.block().copy() + new_block = old_energy_tensor_map.block().copy(deep=False) new_block.add_gradient("positions", _position_gradients_to_block(gradients)) new_energy_tensor_map = TensorMap( keys=old_energy_tensor_map.keys, @@ -147,7 +147,7 @@ def evaluate_model( destroy_graph=(index == len(energy_targets_with_gradients) - 1), ) old_energy_tensor_map = model_outputs[energy_target] - new_block = old_energy_tensor_map.block().copy() + new_block = old_energy_tensor_map.block().copy(deep=False) new_block.add_gradient("strain", _strain_gradients_to_block(gradients)) new_energy_tensor_map = TensorMap( keys=old_energy_tensor_map.keys, diff --git a/src/metatrain/utils/per_atom.py b/src/metatrain/utils/per_atom.py index eb62df4899..e1570f0419 100644 --- a/src/metatrain/utils/per_atom.py +++ b/src/metatrain/utils/per_atom.py @@ -57,7 +57,7 @@ def divide_by_num_atoms(tensor_map: TensorMap, num_atoms: torch.Tensor) -> Tenso blocks = [] for block in tensor_map.blocks(): if "atom" in block.samples.names: - new_block = block.copy() + new_block = block.copy(deep=False) else: values = block.values / num_atoms.view( -1, *[1] * (len(block.values.shape) - 1) @@ -70,7 +70,7 @@ def divide_by_num_atoms(tensor_map: TensorMap, num_atoms: torch.Tensor) -> Tenso ) for gradient_name, gradient in block.gradients(): if "atom" in gradient.samples.names: - new_gradient = gradient.copy() + new_gradient = gradient.copy(deep=False) else: values = gradient.values / num_atoms.view( -1, *[1] * (len(gradient.values.shape) - 1) diff --git a/src/metatrain/utils/scaler/_base_scaler.py b/src/metatrain/utils/scaler/_base_scaler.py index ad69e133b7..bec27dc0e2 100644 --- a/src/metatrain/utils/scaler/_base_scaler.py +++ b/src/metatrain/utils/scaler/_base_scaler.py @@ -831,11 +831,11 @@ def _set_fixed_weights( self.scales[target_name] = TensorMap( self.Y2[target_name].keys.to(device=block.values.device), - [block.copy()], + [block.copy(deep=False)], ) self.per_target_scales[target_name] = TensorMap( self.Y2[target_name].keys.to(device=block.values.device), - [block.copy()], + [block.copy(deep=False)], ) def _sync_device_dtype(self, device: torch.device, dtype: torch.dtype) -> None: diff --git a/tests/utils/test_metrics.py b/tests/utils/test_metrics.py index 235c2b6d70..586dec1639 100644 --- a/tests/utils/test_metrics.py +++ b/tests/utils/test_metrics.py @@ -189,15 +189,15 @@ def test_per_block(accumulator_class, tensor_map_with_grad_1, tensor_map_with_gr tensor_1 = TensorMap( keys=Labels.range("label_name", 2), blocks=[ - tensor_map_with_grad_1.block().copy(), - tensor_map_with_grad_1.block().copy(), + tensor_map_with_grad_1.block().copy(deep=False), + tensor_map_with_grad_1.block().copy(deep=False), ], ) tensor_2 = TensorMap( keys=Labels.range("label_name", 2), blocks=[ - tensor_map_with_grad_2.block().copy(), - tensor_map_with_grad_2.block().copy(), + tensor_map_with_grad_2.block().copy(deep=False), + tensor_map_with_grad_2.block().copy(deep=False), ], ) From a77ec422c38b547a9f7536657de108335efd7fed Mon Sep 17 00:00:00 2001 From: Pol Febrer Calabozo <42074085+pfebrer@users.noreply.github.com> Date: Thu, 21 May 2026 09:27:24 +0200 Subject: [PATCH 25/25] Move sphericart pin --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 42d051c82f..8461d26e39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,6 @@ dependencies = [ "python-hostlist", "tqdm", "vesin >= 0.5.2", # Because of https://github.com/Luthaf/vesin/pull/119, - 'sphericart-torch == 1.0.8 ; platform_system == "Windows"' ] keywords = ["machine learning", "molecular modeling"] @@ -67,6 +66,7 @@ build-backend = "setuptools.build_meta" [project.optional-dependencies] soap-bpnn = [ "torch-spex>=0.1,<0.2", + 'sphericart-torch == 1.0.8 ; platform_system == "Windows"', # for some reason sphericart-torch 1.0.9 can't load on windows "wigners", ] pet = []