Skip to content

Commit 11f56b4

Browse files
committed
skip weights downloading
Signed-off-by: Wenqi Li <[email protected]>
1 parent c816034 commit 11f56b4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_efficientnet.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,12 @@ class TestExtractFeatures(unittest.TestCase):
382382
def test_shape(self, input_param, input_shape, expected_shapes):
383383
device = "cuda" if torch.cuda.is_available() else "cpu"
384384

385-
# initialize model
386-
net = EfficientNetBNFeatures(**input_param).to(device)
385+
try:
386+
# initialize model
387+
net = EfficientNetBNFeatures(**input_param).to(device)
388+
except (ContentTooShortError, HTTPError, RuntimeError) as e:
389+
print(str(e))
390+
return # skipping the tests because of http errors
387391

388392
# run inference with random tensor
389393
with eval_mode(net):

0 commit comments

Comments
 (0)