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
5e5fa0d8
"vscode:/vscode.git/clone" did not exist on "454957c9bb5e8270c384ad46a1bb96928997c249"
Unverified
Commit
5e5fa0d8
authored
Aug 11, 2023
by
amyeroberts
Committed by
GitHub
Aug 11, 2023
Browse files
Mark flaky tests (#25463)
Make CI less brittle
parent
11757e2b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
tests/models/wav2vec2/test_modeling_tf_wav2vec2.py
tests/models/wav2vec2/test_modeling_tf_wav2vec2.py
+1
-1
tests/utils/test_image_utils.py
tests/utils/test_image_utils.py
+2
-1
No files found.
tests/models/wav2vec2/test_modeling_tf_wav2vec2.py
View file @
5e5fa0d8
...
...
@@ -306,7 +306,7 @@ class TFWav2Vec2ModelTester:
model
=
TFWav2Vec2ForCTC
(
config
)
input_lengths
=
tf
.
constant
([
input_values
.
shape
[
-
1
]
//
i
for
i
in
[
4
,
2
,
1
]])
max_length_labels
=
model
.
wav2vec2
.
_get_feat_extract_output_lengths
(
input_lengths
)
labels
=
ids_tensor
((
input_values
.
shape
[
0
],
min
(
max_length_labels
)
-
1
),
model
.
config
.
vocab_size
+
1
00
)
labels
=
ids_tensor
((
input_values
.
shape
[
0
],
min
(
max_length_labels
)
-
1
),
model
.
config
.
vocab_size
+
5
00
)
with
pytest
.
raises
(
ValueError
):
model
(
input_values
,
labels
=
labels
)
...
...
tests/utils/test_image_utils.py
View file @
5e5fa0d8
...
...
@@ -23,7 +23,7 @@ from requests import ReadTimeout
from
tests.pipelines.test_pipelines_document_question_answering
import
INVOICE_URL
from
transformers
import
is_torch_available
,
is_vision_available
from
transformers.image_utils
import
ChannelDimension
,
get_channel_dimension_axis
,
make_list_of_images
from
transformers.testing_utils
import
require_torch
,
require_vision
from
transformers.testing_utils
import
is_flaky
,
require_torch
,
require_vision
if
is_torch_available
():
...
...
@@ -486,6 +486,7 @@ class LoadImageTester(unittest.TestCase):
self
.
assertEqual
(
img_arr
.
shape
,
(
1061
,
750
,
3
))
@
is_flaky
()
def
test_load_img_url_timeout
(
self
):
with
self
.
assertRaises
(
ReadTimeout
):
load_image
(
INVOICE_URL
,
timeout
=
0.001
)
...
...
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