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
f588cf40
"tests/encoder_decoder/test_modeling_encoder_decoder.py" did not exist on "afc4ece462ad83a090af620ff4da099a0272e171"
Unverified
Commit
f588cf40
authored
Feb 09, 2022
by
Suraj Patil
Committed by
GitHub
Feb 09, 2022
Browse files
[Flax tests/FlaxBert] make from_pretrained test faster (#15561)
parent
70292409
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
tests/test_modeling_flax_bert.py
tests/test_modeling_flax_bert.py
+5
-4
No files found.
tests/test_modeling_flax_bert.py
View file @
f588cf40
...
@@ -141,7 +141,8 @@ class FlaxBertModelTest(FlaxModelTesterMixin, unittest.TestCase):
...
@@ -141,7 +141,8 @@ class FlaxBertModelTest(FlaxModelTesterMixin, unittest.TestCase):
@
slow
@
slow
def
test_model_from_pretrained
(
self
):
def
test_model_from_pretrained
(
self
):
for
model_class_name
in
self
.
all_model_classes
:
# Only check this for base model, not necessary for all model classes.
model
=
model_class_name
.
from_pretrained
(
"bert-base-cased"
,
from_pt
=
True
)
# This will also help speed-up tests.
outputs
=
model
(
np
.
ones
((
1
,
1
)))
model
=
FlaxBertModel
.
from_pretrained
(
"bert-base-cased"
)
self
.
assertIsNotNone
(
outputs
)
outputs
=
model
(
np
.
ones
((
1
,
1
)))
self
.
assertIsNotNone
(
outputs
)
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