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
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "83e5a10603ca902c266e40fc98a01dd8a9b04ac4"
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):
@
slow
def
test_model_from_pretrained
(
self
):
for
model_class_name
in
self
.
all_model_classes
:
model
=
model_class_name
.
from_pretrained
(
"bert-base-cased"
,
from_pt
=
True
)
outputs
=
model
(
np
.
ones
((
1
,
1
)))
self
.
assertIsNotNone
(
outputs
)
# Only check this for base model, not necessary for all model classes.
# This will also help speed-up tests.
model
=
FlaxBertModel
.
from_pretrained
(
"bert-base-cased"
)
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