Skip to content

Commit

Permalink
test: 🐛 ignore runtime errors during module import
Browse files Browse the repository at this point in the history
  • Loading branch information
qthequartermasterman committed May 10, 2024
1 parent 3114162 commit 5c89c79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/test_huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_officially_supported_transformers(

# We will dynamically test all available transformers models.
for module in transformers.models.__dict__.values():
with contextlib.suppress(ImportError):
with contextlib.suppress(ImportError, RuntimeError):
if type(module) is transformers.utils.import_utils._LazyModule:
for attr in module._modules:
if "modeling" in attr:
Expand Down

0 comments on commit 5c89c79

Please sign in to comment.