Skip to content

Commit cb40c82

Browse files
committed
Remove inline torchsim module, clean up StateDict removal
Remove the inline torchsim wrapper from metatomic-torch entirely. Engine wrappers belong in standalone packages (metatomic-torchsim), not inside the core package. Deletes the module, tests, tox env, and CI step. Also cleans up the residual dict-to-SimState fallback in the standalone package forward() method and fixes batch tests to use same-sized supercells (the LJ test model cannot batch different-sized systems).
1 parent 4dd5f07 commit cb40c82

9 files changed

Lines changed: 21 additions & 768 deletions

File tree

.github/workflows/torch-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ jobs:
7070
METATOMIC_TESTS_TORCH_VERSION: ${{ matrix.torch-version }}
7171
METATOMIC_TESTS_NUMPY_VERSION_PIN: ${{ matrix.numpy-version-pin }}
7272

73-
- name: run torchsim wrapper tests
73+
- name: run metatomic-torchsim tests
7474
if: matrix.python-version != '3.10'
75-
run: tox -e torchsim-torch-tests
75+
run: tox -e torchsim-tests
7676
env:
7777
PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu
7878
METATOMIC_TESTS_TORCH_VERSION: ${{ matrix.torch-version }}

python/metatomic_torch/metatomic/torch/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,5 @@ def __getattr__(name):
7070
import metatomic.torch.ase_calculator
7171

7272
return metatomic.torch.ase_calculator
73-
elif name == "torchsim":
74-
import metatomic.torch.torchsim
75-
76-
return metatomic.torch.torchsim
7773
else:
7874
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

python/metatomic_torch/metatomic/torch/torchsim.py

Lines changed: 0 additions & 311 deletions
This file was deleted.

python/metatomic_torch/setup.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,15 +321,10 @@ def create_version_number(version):
321321
"metatensor-operations >=0.4.0,<0.5",
322322
]
323323

324-
extras_require = {
325-
"torchsim": ["torch-sim-atomistic"],
326-
}
327-
328324
setup(
329325
version=create_version_number(METATOMIC_TORCH_VERSION),
330326
author=", ".join(authors),
331327
install_requires=install_requires,
332-
extras_require=extras_require,
333328
ext_modules=[
334329
Extension(name="metatomic_torch", sources=[]),
335330
],

0 commit comments

Comments
 (0)