Skip to content

Commit 4d7ffc7

Browse files
committed
oserror
1 parent d28de99 commit 4d7ffc7

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

_unittests/ut_torch_models/test_hghub_api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from onnx_diagnostic.ext_test_case import (
44
ExtTestCase,
55
hide_stdout,
6+
ignore_errors,
67
long_test,
78
never_test,
89
requires_torch,
@@ -26,6 +27,7 @@ class TestHuggingFaceHubApi(ExtTestCase):
2627

2728
@requires_transformers("4.50") # we limit to some versions of the CI
2829
@requires_torch("2.7")
30+
@ignore_errors(OSError) # connectivity issues
2931
@hide_stdout()
3032
def test_enumerate_model_list(self):
3133
models = list(
@@ -76,6 +78,7 @@ def test_get_pretrained_config(self):
7678

7779
@requires_transformers("4.50")
7880
@requires_torch("2.7")
81+
@ignore_errors(OSError) # connectivity issues
7982
@hide_stdout()
8083
def test_get_model_info(self):
8184
info = get_model_info("microsoft/phi-2")

_unittests/ut_xrun_doc/test_documentation_examples.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
import subprocess
66
import time
77
from onnx_diagnostic import __file__ as onnx_diagnostic_file
8-
from onnx_diagnostic.ext_test_case import ExtTestCase, is_windows, has_transformers, has_torch
8+
from onnx_diagnostic.ext_test_case import (
9+
ExtTestCase,
10+
is_windows,
11+
has_transformers,
12+
has_torch,
13+
ignore_errors,
14+
)
915

1016

1117
VERBOSE = 0
@@ -94,6 +100,7 @@ def _test_(self, name=name):
94100

95101
else:
96102

103+
@ignore_errors(OSError) # connectivity issues
97104
def _test_(self, name=name):
98105
res = self.run_test(fold, name, verbose=VERBOSE)
99106
self.assertTrue(res)

0 commit comments

Comments
 (0)