Skip to content

Commit ea681c8

Browse files
authored
General Maintenance & reap FairchemV1 (#522)
1 parent 8d3417a commit ea681c8

15 files changed

Lines changed: 103 additions & 670 deletions

File tree

.github/workflows/test.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ jobs:
6161
- { python: '3.14', resolution: highest }
6262
model:
6363
- { name: fairchem, test_path: "tests/models/test_fairchem.py" }
64-
- { name: fairchem-legacy, test_path: "tests/models/test_fairchem_legacy.py" }
6564
- { name: graphpes, test_path: "tests/models/test_graphpes_framework.py" }
6665
- { name: mace, test_path: "tests/models/test_mace.py" }
6766
- { name: mace, test_path: "tests/test_elastic.py" }
@@ -78,7 +77,6 @@ jobs:
7877
- version: { python: '3.14', resolution: highest }
7978
model: { name: fairchem, test_path: 'tests/models/test_fairchem.py'}
8079
- version: { python: '3.14', resolution: highest }
81-
model: { name: fairchem-legacy, test_path: 'tests/models/test_fairchem_legacy.py'}
8280
- version: { python: '3.14', resolution: highest }
8381
model: { name: nequip, test_path: 'tests/models/test_nequip_framework.py'}
8482
runs-on: ${{ matrix.os }}
@@ -87,14 +85,6 @@ jobs:
8785
- name: Check out repo
8886
uses: actions/checkout@v4
8987

90-
- name: Check out fairchem repository
91-
if: ${{ matrix.model.name == 'fairchem-legacy' }}
92-
uses: actions/checkout@v4
93-
with:
94-
repository: FAIR-Chem/fairchem
95-
path: fairchem-repo
96-
ref: fairchem_core-1.10.0
97-
9888
- name: Set up Python
9989
uses: actions/setup-python@v5
10090
with:
@@ -107,22 +97,7 @@ jobs:
10797
- name: Set up uv
10898
uses: astral-sh/setup-uv@v6
10999

110-
- name: Install legacy fairchem repository and dependencies
111-
if: ${{ matrix.model.name == 'fairchem-legacy' }}
112-
run: |
113-
if [ -f fairchem-repo/packages/requirements.txt ]; then
114-
uv pip install -r fairchem-repo/packages/requirements.txt --system
115-
fi
116-
if [ -f fairchem-repo/packages/requirements-optional.txt ]; then
117-
uv pip install -r fairchem-repo/packages/requirements-optional.txt --system
118-
fi
119-
uv pip install -e fairchem-repo/packages/fairchem-core[dev] --system
120-
uv pip install -e "." --no-deps --system
121-
uv pip install "h5py>=3.12.1" "numpy>=1.26,<3" "scipy<1.17.0" "tables>=3.10.2" "torch>=2" "tqdm>=4.67" --system
122-
uv pip install "ase>=3.26" "phonopy>=2.37.0" "psutil>=7.0.0" "pymatgen>=2025.6.14" "pytest-cov>=6" "pytest>=8" --resolution=${{ matrix.version.resolution }} --system
123-
124100
- name: Install torch_sim with model dependencies
125-
if: ${{ matrix.model.name != 'fairchem-legacy' }}
126101
run: |
127102
# setuptools <82 provides pkg_resources needed by mattersim and fairchem (via torchtnt).
128103
# setuptools 82+ removed pkg_resources. Remove pin once those packages migrate.

tests/models/test_fairchem_legacy.py

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

tests/models/test_nequix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from torch_sim.models.nequix import NequixModel
1717
except (ImportError, ModuleNotFoundError):
1818
pytest.skip(
19-
f"nequix not installed: {traceback.format_exc()}", # ty:ignore[too-many-positional-arguments]
19+
f"nequix not installed: {traceback.format_exc()}",
2020
allow_module_level=True,
2121
)
2222

tests/test_neighbors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def _all_nl_backends() -> list[Any]:
171171
not neighbors.VESIN_AVAILABLE, reason="Vesin is not installed"
172172
)
173173
_skip_vesin_ts = pytest.mark.skipif(
174-
not neighbors.VESIN_TORCH_AVAILABLE, reason="Vesin is not installed"
174+
not neighbors.VESIN_TORCHSCRIPT_AVAILABLE, reason="Vesin is not installed"
175175
)
176176

177177
_skip_alchemiops = pytest.mark.skipif(

torch_sim/models/fairchem.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ def __init__(self, err: ImportError = exc, *_args: Any, **_kwargs: Any) -> None:
4040
"""Dummy init for type checking."""
4141
raise err
4242

43+
def forward(self, *_args: Any, **_kwargs: Any) -> Any:
44+
"""Unreachable — __init__ always raises."""
45+
raise NotImplementedError
46+
4347

4448
if typing.TYPE_CHECKING:
4549
from collections.abc import Callable

0 commit comments

Comments
 (0)