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
af4a1eca
"vscode:/vscode.git/clone" did not exist on "c4ecd234f250cc6272812505b4a9b6cd1e29a816"
Unverified
Commit
af4a1eca
authored
Jun 09, 2022
by
Sylvain Gugger
Committed by
GitHub
Jun 09, 2022
Browse files
Skip tests until bug is fixed. (#17646)
parent
e0b58fb5
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
2 deletions
+11
-2
tests/models/auto/test_configuration_auto.py
tests/models/auto/test_configuration_auto.py
+1
-0
tests/models/auto/test_feature_extraction_auto.py
tests/models/auto/test_feature_extraction_auto.py
+1
-0
tests/models/auto/test_modeling_auto.py
tests/models/auto/test_modeling_auto.py
+1
-0
tests/models/auto/test_modeling_flax_auto.py
tests/models/auto/test_modeling_flax_auto.py
+1
-0
tests/models/auto/test_modeling_tf_auto.py
tests/models/auto/test_modeling_tf_auto.py
+1
-0
tests/models/auto/test_tokenization_auto.py
tests/models/auto/test_tokenization_auto.py
+2
-0
tests/utils/test_file_utils.py
tests/utils/test_file_utils.py
+4
-2
No files found.
tests/models/auto/test_configuration_auto.py
View file @
af4a1eca
...
...
@@ -88,6 +88,7 @@ class AutoConfigTest(unittest.TestCase):
if
"custom"
in
CONFIG_MAPPING
.
_extra_content
:
del
CONFIG_MAPPING
.
_extra_content
[
"custom"
]
@
unittest
.
skip
(
"Temp bug in the Hub not returning RepoNotFound errors."
)
def
test_repo_not_found
(
self
):
with
self
.
assertRaisesRegex
(
EnvironmentError
,
"bert-base is not a local folder and is not a valid model identifier"
...
...
tests/models/auto/test_feature_extraction_auto.py
View file @
af4a1eca
...
...
@@ -76,6 +76,7 @@ class AutoFeatureExtractorTest(unittest.TestCase):
config
=
AutoFeatureExtractor
.
from_pretrained
(
SAMPLE_FEATURE_EXTRACTION_CONFIG
)
self
.
assertIsInstance
(
config
,
Wav2Vec2FeatureExtractor
)
@
unittest
.
skip
(
"Temp bug in the Hub not returning RepoNotFound errors."
)
def
test_repo_not_found
(
self
):
with
self
.
assertRaisesRegex
(
EnvironmentError
,
"bert-base is not a local folder and is not a valid model identifier"
...
...
tests/models/auto/test_modeling_auto.py
View file @
af4a1eca
...
...
@@ -328,6 +328,7 @@ class AutoModelTest(unittest.TestCase):
if
CustomConfig
in
mapping
.
_extra_content
:
del
mapping
.
_extra_content
[
CustomConfig
]
@
unittest
.
skip
(
"Temp bug in the Hub not returning RepoNotFound errors."
)
def
test_repo_not_found
(
self
):
with
self
.
assertRaisesRegex
(
EnvironmentError
,
"bert-base is not a local folder and is not a valid model identifier"
...
...
tests/models/auto/test_modeling_flax_auto.py
View file @
af4a1eca
...
...
@@ -77,6 +77,7 @@ class FlaxAutoModelTest(unittest.TestCase):
eval
(
**
tokens
).
block_until_ready
()
@
unittest
.
skip
(
"Temp bug in the Hub not returning RepoNotFound errors."
)
def
test_repo_not_found
(
self
):
with
self
.
assertRaisesRegex
(
EnvironmentError
,
"bert-base is not a local folder and is not a valid model identifier"
...
...
tests/models/auto/test_modeling_tf_auto.py
View file @
af4a1eca
...
...
@@ -265,6 +265,7 @@ class TFAutoModelTest(unittest.TestCase):
if
NewModelConfig
in
mapping
.
_extra_content
:
del
mapping
.
_extra_content
[
NewModelConfig
]
@
unittest
.
skip
(
"Temp bug in the Hub not returning RepoNotFound errors."
)
def
test_repo_not_found
(
self
):
with
self
.
assertRaisesRegex
(
EnvironmentError
,
"bert-base is not a local folder and is not a valid model identifier"
...
...
tests/models/auto/test_tokenization_auto.py
View file @
af4a1eca
...
...
@@ -142,6 +142,7 @@ class AutoTokenizerTest(unittest.TestCase):
self
.
assertEqual
(
tokenizer
.
model_max_length
,
512
)
@
unittest
.
skip
(
"Temp bug in the Hub not returning RepoNotFound errors."
)
@
require_tokenizers
def
test_tokenizer_identifier_non_existent
(
self
):
for
tokenizer_class
in
[
BertTokenizer
,
BertTokenizerFast
,
AutoTokenizer
]:
...
...
@@ -329,6 +330,7 @@ class AutoTokenizerTest(unittest.TestCase):
else
:
self
.
assertEqual
(
tokenizer
.
__class__
.
__name__
,
"NewTokenizer"
)
@
unittest
.
skip
(
"Temp bug in the Hub not returning RepoNotFound errors."
)
def
test_repo_not_found
(
self
):
with
self
.
assertRaisesRegex
(
EnvironmentError
,
"bert-base is not a local folder and is not a valid model identifier"
...
...
tests/utils/test_file_utils.py
View file @
af4a1eca
...
...
@@ -99,6 +99,7 @@ class GetFromCacheTests(unittest.TestCase):
with
self
.
assertRaisesRegex
(
EntryNotFoundError
,
"404 Client Error"
):
_
=
get_from_cache
(
url
)
@
unittest
.
skip
(
"Temp bug in the Hub not returning RepoNotFound errors."
)
def
test_model_not_found
(
self
):
# Invalid model file.
url
=
hf_bucket_url
(
"bert-base"
,
filename
=
"pytorch_model.bin"
)
...
...
@@ -141,8 +142,9 @@ class GetFromCacheTests(unittest.TestCase):
self
.
assertIsNone
(
get_file_from_repo
(
"bert-base-cased"
,
"ahah.txt"
))
# The function raises if the repository does not exist.
with
self
.
assertRaisesRegex
(
EnvironmentError
,
"is not a valid model identifier"
):
get_file_from_repo
(
"bert-base-case"
,
"config.json"
)
# Uncomment when bug is fixed.
# with self.assertRaisesRegex(EnvironmentError, "is not a valid model identifier"):
# get_file_from_repo("bert-base-case", "config.json")
# The function raises if the revision does not exist.
with
self
.
assertRaisesRegex
(
EnvironmentError
,
"is not a valid git identifier"
):
...
...
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