Skip to content

Commit 51febd8

Browse files
committed
Small tweak to tests for tnt model, reorder model imports.
1 parent b27a4e0 commit 51febd8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/test_models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
# transformer models don't support many of the spatial / feature based model functionalities
1717
NON_STD_FILTERS = ['vit_*', 'tnt_*']
18+
NUM_NON_STD = len(NON_STD_FILTERS)
1819

1920
# exclude models that cause specific test failures
2021
if 'GITHUB_ACTIONS' in os.environ: # and 'Linux' in platform.system():
@@ -31,7 +32,7 @@
3132

3233

3334
@pytest.mark.timeout(120)
34-
@pytest.mark.parametrize('model_name', list_models(exclude_filters=EXCLUDE_FILTERS[:-1]))
35+
@pytest.mark.parametrize('model_name', list_models(exclude_filters=EXCLUDE_FILTERS[:-NUM_NON_STD]))
3536
@pytest.mark.parametrize('batch_size', [1])
3637
def test_model_forward(model_name, batch_size):
3738
"""Run a single forward pass with each model"""

timm/models/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .efficientnet import *
77
from .gluon_resnet import *
88
from .gluon_xception import *
9+
from .hardcorenas import *
910
from .hrnet import *
1011
from .inception_resnet_v2 import *
1112
from .inception_v3 import *
@@ -23,14 +24,13 @@
2324
from .selecsls import *
2425
from .senet import *
2526
from .sknet import *
27+
from .tnt import *
2628
from .tresnet import *
2729
from .vgg import *
2830
from .vision_transformer import *
2931
from .vovnet import *
3032
from .xception import *
3133
from .xception_aligned import *
32-
from .hardcorenas import *
33-
from .tnt import *
3434

3535
from .factory import create_model, split_model_name, safe_model_name
3636
from .helpers import load_checkpoint, resume_checkpoint, model_parameters

0 commit comments

Comments
 (0)