Skip to content

Commit 89f764f

Browse files
committed
Revert "Update tests/test_mlip_calculators.py"
This reverts commit 4c11594.
1 parent 4c11594 commit 89f764f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/test_mlip_calculators.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,14 @@
6666
from fairchem.core import pretrained_mlip
6767
from huggingface_hub.errors import GatedRepoError
6868

69-
UMA_PREDICT_UNIT = pretrained_mlip.get_predict_unit(
70-
model_name=UMA_LABEL, device="cpu"
71-
)
69+
try:
70+
UMA_PREDICT_UNIT = pretrained_mlip.get_predict_unit(
71+
model_name=UMA_LABEL, device="cpu"
72+
)
73+
except GatedRepoError:
74+
UMA_PREDICT_UNIT = None
7275

73-
except (ImportError, GatedRepoError):
76+
except ImportError:
7477
UMA_PREDICT_UNIT = None
7578

7679

0 commit comments

Comments
 (0)