Skip to content

Commit 68c3621

Browse files
committed
added GH actions exceptionn for the efficientnet unit test. Bumped version to 1.4
1 parent 746fb57 commit 68c3621

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.2
1+
1.4.0

pytorch_widedeep/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.3.2"
1+
__version__ = "1.4.0"

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def requirements(fname):
2222
"1.1": "Development Status :: 5 - Production/Stable", # v1.1 - new functionality
2323
"1.2": "Development Status :: 5 - Production/Stable", # v1.2 - new functionality
2424
"1.3": "Development Status :: 5 - Production/Stable", # v1.3 - new functionality
25+
"1.4": "Development Status :: 5 - Production/Stable", # v1.3 - new functionality
2526
"2.0": "Development Status :: 6 - Mature", # v2.0 - new functionality?
2627
}
2728

tests/test_model_components/test_mc_image.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import numpy as np
23
import torch
34
import pytest
@@ -102,7 +103,7 @@ def test_all_frozen():
102103
("regnet", 912),
103104
("mobilenet", 1280),
104105
("mnasnet", 1280),
105-
("efficientnet", 1280),
106+
# ("efficientnet", 1280),
106107
("squeezenet", 512),
107108
({"shufflenet": ShuffleNet_V2_X0_5_Weights.IMAGENET1K_V1}, 1024),
108109
({"resnext": ResNeXt50_32X4D_Weights.IMAGENET1K_V2}, 2048),
@@ -112,3 +113,19 @@ def test_pretrained_model_setup_defaults(arch, expected_out_shape):
112113
model = Vision(pretrained_model_setup=arch, n_trainable=0)
113114
out = model(X_images)
114115
assert out.size(0) == 10 and out.size(1) == expected_out_shape
116+
117+
118+
IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true"
119+
120+
121+
@pytest.mark.skipif(
122+
IN_GITHUB_ACTIONS,
123+
reason=(
124+
"For reasons beyond me, when running in GH actions, "
125+
"throws a RuntimeError when trying to download the weights"
126+
),
127+
)
128+
def test_pretrained_model_efficientnet():
129+
model = Vision(pretrained_model_setup="efficientnet", n_trainable=0)
130+
out = model(X_images)
131+
assert out.size(0) == 10 and out.size(1) == 1280

0 commit comments

Comments
 (0)