-
Notifications
You must be signed in to change notification settings - Fork 634
RFDETR-Seg ONNX Export Failing #626
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
base: develop
Are you sure you want to change the base?
RFDETR-Seg ONNX Export Failing #626
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (0%) is below the target coverage (95%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #626 +/- ##
======================================
- Coverage 22% 22% -0%
======================================
Files 46 46
Lines 6182 6188 +6
======================================
Hits 1343 1343
- Misses 4839 4845 +6 🚀 New features to boost your workflow:
|
|
lgtm! |
| try: | ||
| from rfdetr import RFDETRSegNano | ||
| except ImportError: | ||
| pytest.skip("rfdetr not installed") |
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.
| try: | |
| from rfdetr import RFDETRSegNano | |
| except ImportError: | |
| pytest.skip("rfdetr not installed") |
what is the case this is missing?
| try: | ||
| import onnx # noqa: F401 | ||
| except ImportError: | ||
| pytest.skip("onnx not installed, run: pip install rfdetr[onnxexport]") |
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.
Use rather a decorator pytest.mark.skipif(...)
| [project.optional-dependencies] | ||
| onnxexport = [ | ||
| "onnx", | ||
| "onnx>=1.16.0,<1.20", |
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.
| "onnx>=1.16.0,<1.20", | |
| "onnx>=1.16.0", |
Won't it work with versions above 1.20?
What does this PR do?
Fixes ONNX export for segmentation models.
Issues fixed:
Export failed with
AttributeError: 'dict' object has no attribute 'shape'becausepred_maskscan be a dictionary (containingspatial_features,query_features,bias) rather than a tensor. Added a check to handle both cases inmain.pyanddeploy/export.py.Pinned
onnx>=1.16.0,<1.20inpyproject.tomlto avoid compatibility issues withonnx_graphsurgeon(onnx 1.20+ removedfloat32_to_bfloat16).Related Issue(s): Related to PR #578 and to Issue #580
Type of Change
Testing
Checklist