Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ColossalAI
Commits
2082852f
"examples/git@developer.sourcefind.cn:OpenDAS/dynamo.git" did not exist on "a8c5637fc508e5596eae1c2ff5b55150caedea56"
Unverified
Commit
2082852f
authored
Apr 26, 2024
by
Hongxin Liu
Committed by
GitHub
Apr 26, 2024
Browse files
[lazyinit] skip whisper test (#5653)
parent
8b7d5359
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
tests/test_lazy/test_models.py
tests/test_lazy/test_models.py
+8
-6
No files found.
tests/test_lazy/test_models.py
View file @
2082852f
...
@@ -7,21 +7,23 @@ from tests.kit.model_zoo import COMMON_MODELS, IS_FAST_TEST, model_zoo
...
@@ -7,21 +7,23 @@ from tests.kit.model_zoo import COMMON_MODELS, IS_FAST_TEST, model_zoo
@
pytest
.
mark
.
skipif
(
not
SUPPORT_LAZY
,
reason
=
"requires torch >= 1.12.0"
)
@
pytest
.
mark
.
skipif
(
not
SUPPORT_LAZY
,
reason
=
"requires torch >= 1.12.0"
)
@
pytest
.
mark
.
parametrize
(
@
pytest
.
mark
.
parametrize
(
"subset"
,
"subset"
,
[
COMMON_MODELS
]
(
if
IS_FAST_TEST
[
COMMON_MODELS
]
else
[
"torchvision"
,
"diffusers"
,
"timm"
,
"transformers"
,
"torchaudio"
,
"deepfm"
,
"dlrm"
],
if
IS_FAST_TEST
else
[
"torchvision"
,
"diffusers"
,
"timm"
,
"transformers"
,
"torchaudio"
,
"deepfm"
,
"dlrm"
]
),
)
)
@
pytest
.
mark
.
parametrize
(
"default_device"
,
[
"cpu"
,
"cuda"
])
@
pytest
.
mark
.
parametrize
(
"default_device"
,
[
"cpu"
,
"cuda"
])
def
test_
torchvision_
models_lazy_init
(
subset
,
default_device
):
def
test_models_lazy_init
(
subset
,
default_device
):
sub_model_zoo
=
model_zoo
.
get_sub_registry
(
subset
,
allow_empty
=
True
)
sub_model_zoo
=
model_zoo
.
get_sub_registry
(
subset
,
allow_empty
=
True
)
for
name
,
entry
in
sub_model_zoo
.
items
():
for
name
,
entry
in
sub_model_zoo
.
items
():
# TODO(ver217): lazy init does not support weight norm, skip these models
# TODO(ver217): lazy init does not support weight norm, skip these models
if
name
in
(
"torchaudio_wav2vec2_base"
,
"torchaudio_hubert_base"
)
or
name
.
startswith
(
if
name
in
(
"torchaudio_wav2vec2_base"
,
"torchaudio_hubert_base"
)
or
name
.
startswith
(
(
"transformers_vit"
,
"transformers_blip2"
)
(
"transformers_vit"
,
"transformers_blip2"
,
"transformers_whisper"
)
):
):
continue
continue
check_lazy_init
(
entry
,
verbose
=
True
,
default_device
=
default_device
)
check_lazy_init
(
entry
,
verbose
=
True
,
default_device
=
default_device
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
test_
torchvision_
models_lazy_init
(
"transformers"
,
"cpu"
)
test_models_lazy_init
(
"transformers"
,
"cpu"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment