Skip to content

Commit 4c11594

Browse files
Update tests/test_mlip_calculators.py
Co-authored-by: Jacob Wilkins <46597752+oerc0122@users.noreply.github.com>
1 parent 69163e0 commit 4c11594

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

tests/test_mlip_calculators.py

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

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
69+
UMA_PREDICT_UNIT = pretrained_mlip.get_predict_unit(
70+
model_name=UMA_LABEL, device="cpu"
71+
)
7572

76-
except ImportError:
73+
except (ImportError, GatedRepoError):
7774
UMA_PREDICT_UNIT = None
7875

7976

0 commit comments

Comments
 (0)