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
f7329751
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "62399d6f3568d1436e3e0364a32d13e32bb78cb6"
Unverified
Commit
f7329751
authored
Mar 14, 2023
by
Sylvain Gugger
Committed by
GitHub
Mar 14, 2023
Browse files
Run all tests by default (#22162)
parent
b7036f49
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
14 deletions
+10
-14
.circleci/create_circleci_config.py
.circleci/create_circleci_config.py
+8
-1
src/transformers/testing_utils.py
src/transformers/testing_utils.py
+2
-13
No files found.
.circleci/create_circleci_config.py
View file @
f7329751
...
@@ -24,7 +24,14 @@ from typing import Any, Dict, List, Optional
...
@@ -24,7 +24,14 @@ from typing import Any, Dict, List, Optional
import
yaml
import
yaml
COMMON_ENV_VARIABLES
=
{
"OMP_NUM_THREADS"
:
1
,
"TRANSFORMERS_IS_CI"
:
True
,
"PYTEST_TIMEOUT"
:
120
,
"RUN_PIPELINE_TESTS"
:
False
}
COMMON_ENV_VARIABLES
=
{
"OMP_NUM_THREADS"
:
1
,
"TRANSFORMERS_IS_CI"
:
True
,
"PYTEST_TIMEOUT"
:
120
,
"RUN_PIPELINE_TESTS"
:
False
,
"RUN_PT_TF_CROSS_TESTS"
:
False
,
"RUN_PT_FLAX_CROSS_TESTS"
:
False
,
}
COMMON_PYTEST_OPTIONS
=
{
"max-worker-restart"
:
0
,
"dist"
:
"loadfile"
,
"s"
:
None
}
COMMON_PYTEST_OPTIONS
=
{
"max-worker-restart"
:
0
,
"dist"
:
"loadfile"
,
"s"
:
None
}
DEFAULT_DOCKER_IMAGE
=
[{
"image"
:
"cimg/python:3.7.12"
}]
DEFAULT_DOCKER_IMAGE
=
[{
"image"
:
"cimg/python:3.7.12"
}]
...
...
src/transformers/testing_utils.py
View file @
f7329751
...
@@ -139,11 +139,10 @@ def parse_int_from_env(key, default=None):
...
@@ -139,11 +139,10 @@ def parse_int_from_env(key, default=None):
_run_slow_tests
=
parse_flag_from_env
(
"RUN_SLOW"
,
default
=
False
)
_run_slow_tests
=
parse_flag_from_env
(
"RUN_SLOW"
,
default
=
False
)
_run_pt_tf_cross_tests
=
parse_flag_from_env
(
"RUN_PT_TF_CROSS_TESTS"
,
default
=
Fals
e
)
_run_pt_tf_cross_tests
=
parse_flag_from_env
(
"RUN_PT_TF_CROSS_TESTS"
,
default
=
Tru
e
)
_run_pt_flax_cross_tests
=
parse_flag_from_env
(
"RUN_PT_FLAX_CROSS_TESTS"
,
default
=
Fals
e
)
_run_pt_flax_cross_tests
=
parse_flag_from_env
(
"RUN_PT_FLAX_CROSS_TESTS"
,
default
=
Tru
e
)
_run_custom_tokenizers
=
parse_flag_from_env
(
"RUN_CUSTOM_TOKENIZERS"
,
default
=
False
)
_run_custom_tokenizers
=
parse_flag_from_env
(
"RUN_CUSTOM_TOKENIZERS"
,
default
=
False
)
_run_staging
=
parse_flag_from_env
(
"HUGGINGFACE_CO_STAGING"
,
default
=
False
)
_run_staging
=
parse_flag_from_env
(
"HUGGINGFACE_CO_STAGING"
,
default
=
False
)
_run_git_lfs_tests
=
parse_flag_from_env
(
"RUN_GIT_LFS_TESTS"
,
default
=
False
)
_tf_gpu_memory_limit
=
parse_int_from_env
(
"TF_GPU_MEMORY_LIMIT"
,
default
=
None
)
_tf_gpu_memory_limit
=
parse_int_from_env
(
"TF_GPU_MEMORY_LIMIT"
,
default
=
None
)
_run_pipeline_tests
=
parse_flag_from_env
(
"RUN_PIPELINE_TESTS"
,
default
=
True
)
_run_pipeline_tests
=
parse_flag_from_env
(
"RUN_PIPELINE_TESTS"
,
default
=
True
)
...
@@ -257,16 +256,6 @@ def require_bs4(test_case):
...
@@ -257,16 +256,6 @@ def require_bs4(test_case):
return
unittest
.
skipUnless
(
is_bs4_available
(),
"test requires BeautifulSoup4"
)(
test_case
)
return
unittest
.
skipUnless
(
is_bs4_available
(),
"test requires BeautifulSoup4"
)(
test_case
)
def
require_git_lfs
(
test_case
):
"""
Decorator marking a test that requires git-lfs.
git-lfs requires additional dependencies, and tests are skipped by default. Set the RUN_GIT_LFS_TESTS environment
variable to a truthy value to run them.
"""
return
unittest
.
skipUnless
(
_run_git_lfs_tests
,
"test of git lfs workflow"
)(
test_case
)
def
require_accelerate
(
test_case
):
def
require_accelerate
(
test_case
):
"""
"""
Decorator marking a test that requires accelerate. These tests are skipped when accelerate isn't installed.
Decorator marking a test that requires accelerate. These tests are skipped when accelerate isn't installed.
...
...
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