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
chenpangpang
transformers
Commits
539ed75d
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "77321481247787c97568c3b9f64b19e22351bab8"
Unverified
Commit
539ed75d
authored
May 13, 2024
by
Marc Sun
Committed by
GitHub
May 13, 2024
Browse files
skip low_cpu_mem_usage tests (#30782)
parent
0f8fefd4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
tests/test_modeling_common.py
tests/test_modeling_common.py
+4
-0
No files found.
tests/test_modeling_common.py
View file @
539ed75d
...
@@ -21,6 +21,7 @@ import os.path
...
@@ -21,6 +21,7 @@ import os.path
import
random
import
random
import
re
import
re
import
tempfile
import
tempfile
import
unittest
import
warnings
import
warnings
from
collections
import
defaultdict
from
collections
import
defaultdict
from
typing
import
Dict
,
List
,
Tuple
from
typing
import
Dict
,
List
,
Tuple
...
@@ -440,6 +441,7 @@ class ModelTesterMixin:
...
@@ -440,6 +441,7 @@ class ModelTesterMixin:
@
slow
@
slow
@
require_accelerate
@
require_accelerate
@
mark
.
accelerate_tests
@
mark
.
accelerate_tests
@
unittest
.
skip
(
"Need to fix since we have a device mismatch"
)
def
test_save_load_low_cpu_mem_usage
(
self
):
def
test_save_load_low_cpu_mem_usage
(
self
):
config
,
inputs_dict
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
config
,
inputs_dict
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
with
tempfile
.
TemporaryDirectory
()
as
saved_model_path
:
with
tempfile
.
TemporaryDirectory
()
as
saved_model_path
:
...
@@ -452,6 +454,7 @@ class ModelTesterMixin:
...
@@ -452,6 +454,7 @@ class ModelTesterMixin:
@
slow
@
slow
@
require_accelerate
@
require_accelerate
@
mark
.
accelerate_tests
@
mark
.
accelerate_tests
@
unittest
.
skip
(
"Need to fix since we have a device mismatch"
)
def
test_save_load_low_cpu_mem_usage_checkpoints
(
self
):
def
test_save_load_low_cpu_mem_usage_checkpoints
(
self
):
config
,
inputs_dict
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
config
,
inputs_dict
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
with
tempfile
.
TemporaryDirectory
()
as
saved_model_path
:
with
tempfile
.
TemporaryDirectory
()
as
saved_model_path
:
...
@@ -465,6 +468,7 @@ class ModelTesterMixin:
...
@@ -465,6 +468,7 @@ class ModelTesterMixin:
@
slow
@
slow
@
require_accelerate
@
require_accelerate
@
mark
.
accelerate_tests
@
mark
.
accelerate_tests
@
unittest
.
skip
(
"Need to fix since we have a device mismatch"
)
def
test_save_load_low_cpu_mem_usage_no_safetensors
(
self
):
def
test_save_load_low_cpu_mem_usage_no_safetensors
(
self
):
with
tempfile
.
TemporaryDirectory
()
as
saved_model_path
:
with
tempfile
.
TemporaryDirectory
()
as
saved_model_path
:
for
model_class
in
self
.
all_model_classes
:
for
model_class
in
self
.
all_model_classes
:
...
...
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