"vscode:/vscode.git/clone" did not exist on "c4ecd234f250cc6272812505b4a9b6cd1e29a816"
Unverified Commit af4a1eca authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Skip tests until bug is fixed. (#17646)

parent e0b58fb5
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment