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
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ docs = [
"autodoc_pydantic==2.2.0",
"furo==2024.8.6",
"ipython==8.34.0",
"ipykernel==6.30.1",
"jsonschema[format]",
"jupyterlab==4.3.4",
"jupyter-core==5.8.1",
"jupytext==1.16.7",
"myst_parser==4.0.0",
"nbsphinx>=0.9.7",
Expand Down
6 changes: 3 additions & 3 deletions tests/models/test_fairchem.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,16 @@ def test_empty_batch_error() -> None:
@pytest.mark.skipif(
get_token() is None, reason="Requires HuggingFace authentication for UMA model access"
)
def test_load_from_checkpoint_path(device: torch.device, dtype: torch.dtype) -> None:
def test_load_from_checkpoint_path() -> None:
"""Test loading model from a saved checkpoint file path."""
checkpoint_path = pretrained_checkpoint_path_from_name("uma-s-1")
loaded_model = FairChemModel(
model=str(checkpoint_path), task_name="omat", cpu=device.type == "cpu"
model=str(checkpoint_path), task_name="omat", cpu=DEVICE == "cpu"
)

# Verify the loaded model works
system = bulk("Si", "diamond", a=5.43)
state = ts.io.atoms_to_state([system], device=device, dtype=dtype)
state = ts.io.atoms_to_state([system], device=DEVICE, dtype=DTYPE)
results = loaded_model(state)

assert "energy" in results
Expand Down