-
Notifications
You must be signed in to change notification settings - Fork 27.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Data2VecVision ONNX test #18587
Fix Data2VecVision ONNX test #18587
Conversation
The documentation is not available anymore as the PR was closed or merged. |
b08a37d
to
8e94061
Compare
8e94061
to
ad0492b
Compare
With Current thread 0x00007f5bb924e740 (most recent call first):
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/_io/saferepr.py", line 71 in repr_instance
File "/usr/lib/python3.9/reprlib.py", line 62 in repr1
File "/usr/lib/python3.9/reprlib.py", line 71 in <listcomp>
File "/usr/lib/python3.9/reprlib.py", line 71 in _repr_iterable
File "/usr/lib/python3.9/reprlib.py", line 78 in repr_tuple
File "/usr/lib/python3.9/reprlib.py", line 60 in repr1
File "/usr/lib/python3.9/reprlib.py", line 52 in repr
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/_io/saferepr.py", line 60 in repr
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/_io/saferepr.py", line 107 in saferepr
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/_code/code.py", line 727 in repr_args
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/_code/code.py", line 817 in repr_traceback_entry
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/_code/code.py", line 867 in repr_traceback
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/_code/code.py", line 926 in repr_excinfo
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/_code/code.py", line 666 in getrepr
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/nodes.py", line 475 in _repr_failure_py
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/python.py", line 1795 in repr_failure
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/reports.py", line 345 in from_item_and_call
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/runner.py", line 365 in pytest_runtest_makereport
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pluggy/_callers.py", line 39 in _multicall
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pluggy/_manager.py", line 80 in _hookexec
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pluggy/_hooks.py", line 265 in __call__
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/runner.py", line 221 in call_and_report
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/runner.py", line 130 in runtestprotocol
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/runner.py", line 111 in pytest_runtest_protocol
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pluggy/_callers.py", line 39 in _multicall
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pluggy/_manager.py", line 80 in _hookexec
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pluggy/_hooks.py", line 265 in __call__
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/main.py", line 347 in pytest_runtestloop
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pluggy/_callers.py", line 39 in _multicall
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pluggy/_manager.py", line 80 in _hookexec
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pluggy/_hooks.py", line 265 in __call__
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/main.py", line 322 in _main
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/main.py", line 268 in wrap_session
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/main.py", line 315 in pytest_cmdline_main
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pluggy/_callers.py", line 39 in _multicall
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pluggy/_manager.py", line 80 in _hookexec
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pluggy/_hooks.py", line 265 in __call__
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 164 in main
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 187 in console_main
File "/home/yih_dar_huggingface_co/.local/lib/python3.9/site-packages/pytest/__main__.py", line 5 in <module>
File "/usr/lib/python3.9/runpy.py", line 87 in _run_code
File "/usr/lib/python3.9/runpy.py", line 197 in _run_module_as_main
Segmentation fault |
a8b7838
to
ea35838
Compare
tests/onnx/test_onnx_v2.py
Outdated
|
||
# It seems `nn.AdaptiveAvgPool2d` with `output_size` > 1 is not working with ONNX. We get `Segmentation fault` | ||
# without any useful information. | ||
if model.__class__.__name__ == "Data2VecVisionForSemanticSegmentation": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should just skip this test for Data2VecVisionForSemanticSegmentation
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but should be approved by @michaelbenayoun or @lewtun before merging :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for digging into this tricky bug @ydshieh !
I think semantic-segmentation
can't be supported for this model, so suggest removing that feature altogether in the ONNX features list. That should remove the failing tests and we can revisit this once PyTorch adds support for the missing op
Thanks @lewtun for the review. Totally fine for me to remove |
979db82
to
e05a27d
Compare
The failed tests are irrelevant. @lewtun it's ready for you to take a final look 🚀 ! FAILED tests/models/bigbird_pegasus/test_modeling_bigbird_pegasus.py::BigBirdPegasusStandaloneDecoderModelTest::test_sample_generate
FAILED tests/models/xlm_roberta_xl/test_modeling_xlm_roberta_xl.py::XLMRobertaXLModelTest::test_sample_generate_dict_output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for iterating on this @ydshieh ! The change looks good to me and I've just rerun the tests to see if we can get a nice green CI before merging
Now we have a different generation test failing:
Since this is unrelated to the current PR, is it OK to merge? |
e05a27d
to
ed398a1
Compare
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
What does this PR do?
Fix an issue from #18427. In short,
Data2VecVision
is for semantic segmentation.Current CI test failure