Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ jobs:
- { python: '3.14', resolution: highest }
model:
- { name: fairchem, test_path: "tests/models/test_fairchem.py" }
- { name: fairchem-legacy, test_path: "tests/models/test_fairchem_legacy.py" }
- { name: graphpes, test_path: "tests/models/test_graphpes_framework.py" }
- { name: mace, test_path: "tests/models/test_mace.py" }
- { name: mace, test_path: "tests/test_elastic.py" }
Expand All @@ -78,7 +77,6 @@ jobs:
- version: { python: '3.14', resolution: highest }
model: { name: fairchem, test_path: 'tests/models/test_fairchem.py'}
- version: { python: '3.14', resolution: highest }
model: { name: fairchem-legacy, test_path: 'tests/models/test_fairchem_legacy.py'}
- version: { python: '3.14', resolution: highest }
model: { name: nequip, test_path: 'tests/models/test_nequip_framework.py'}
runs-on: ${{ matrix.os }}
Expand All @@ -87,14 +85,6 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4

- name: Check out fairchem repository
if: ${{ matrix.model.name == 'fairchem-legacy' }}
uses: actions/checkout@v4
with:
repository: FAIR-Chem/fairchem
path: fairchem-repo
ref: fairchem_core-1.10.0

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -107,22 +97,7 @@ jobs:
- name: Set up uv
uses: astral-sh/setup-uv@v6

- name: Install legacy fairchem repository and dependencies
if: ${{ matrix.model.name == 'fairchem-legacy' }}
run: |
if [ -f fairchem-repo/packages/requirements.txt ]; then
uv pip install -r fairchem-repo/packages/requirements.txt --system
fi
if [ -f fairchem-repo/packages/requirements-optional.txt ]; then
uv pip install -r fairchem-repo/packages/requirements-optional.txt --system
fi
uv pip install -e fairchem-repo/packages/fairchem-core[dev] --system
uv pip install -e "." --no-deps --system
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
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

- name: Install torch_sim with model dependencies
if: ${{ matrix.model.name != 'fairchem-legacy' }}
run: |
# setuptools <82 provides pkg_resources needed by mattersim and fairchem (via torchtnt).
# setuptools 82+ removed pkg_resources. Remove pin once those packages migrate.
Expand Down
120 changes: 0 additions & 120 deletions tests/models/test_fairchem_legacy.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/models/test_nequix.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from torch_sim.models.nequix import NequixModel
except (ImportError, ModuleNotFoundError):
pytest.skip(
f"nequix not installed: {traceback.format_exc()}", # ty:ignore[too-many-positional-arguments]
f"nequix not installed: {traceback.format_exc()}",
allow_module_level=True,
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def _all_nl_backends() -> list[Any]:
not neighbors.VESIN_AVAILABLE, reason="Vesin is not installed"
)
_skip_vesin_ts = pytest.mark.skipif(
not neighbors.VESIN_TORCH_AVAILABLE, reason="Vesin is not installed"
not neighbors.VESIN_TORCHSCRIPT_AVAILABLE, reason="Vesin is not installed"
)

_skip_alchemiops = pytest.mark.skipif(
Expand Down
4 changes: 4 additions & 0 deletions torch_sim/models/fairchem.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ def __init__(self, err: ImportError = exc, *_args: Any, **_kwargs: Any) -> None:
"""Dummy init for type checking."""
raise err

def forward(self, *_args: Any, **_kwargs: Any) -> Any:
"""Unreachable — __init__ always raises."""
raise NotImplementedError


if typing.TYPE_CHECKING:
from collections.abc import Callable
Expand Down
Loading
Loading