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
31c799a0
Unverified
Commit
31c799a0
authored
May 18, 2020
by
Funtowicz Morgan
Committed by
GitHub
May 18, 2020
Browse files
Tag onnx export tests as slow (#4432)
parent
8581a670
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
tests/test_onnx.py
tests/test_onnx.py
+3
-1
No files found.
tests/test_onnx.py
View file @
31c799a0
...
...
@@ -3,7 +3,7 @@ from os import sep
from
os.path
import
dirname
,
exists
from
shutil
import
rmtree
from
tests.utils
import
require_tf
,
require_torch
from
tests.utils
import
require_tf
,
require_torch
,
slow
from
transformers
import
BertConfig
,
BertTokenizerFast
,
FeatureExtractionPipeline
from
transformers.convert_graph_to_onnx
import
convert
,
ensure_valid_input
,
infer_shapes
...
...
@@ -22,11 +22,13 @@ class OnnxExportTestCase(unittest.TestCase):
MODEL_TO_TEST
=
[
"bert-base-cased"
,
"gpt2"
,
"roberta-base"
]
@
require_tf
@
slow
def
test_export_tensorflow
(
self
):
for
model
in
OnnxExportTestCase
.
MODEL_TO_TEST
:
self
.
_test_export
(
model
,
"tf"
,
11
)
@
require_torch
@
slow
def
test_export_pytorch
(
self
):
for
model
in
OnnxExportTestCase
.
MODEL_TO_TEST
:
self
.
_test_export
(
model
,
"pt"
,
11
)
...
...
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