fix: remove redundant line in export#343
Conversation
|
it's just the print statement that's wrong, correct? the onnx graph actually does have 300 outputs for you? |
Yes, only the print statement is wrong, onnx graph do have 300 outputs. When running 2 export consecutively, The first one will print 3900 and the second one will print 300. The model is switched to eval mode somewhere during the conversion process. |
Yes, it's intended. My thought was as the then put on cpu line 537 so no change is made to the original model |
ok, could you pls resolve collisions and update the PR description? |
60b16c1 to
523f9df
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (27%) is below the target coverage (95%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## develop #343 +/- ##
========================================
- Coverage 60% 27% -33%
========================================
Files 52 52
Lines 6734 6733 -1
========================================
- Hits 4041 1809 -2232
- Misses 2693 4924 +2231 🚀 New features to boost your workflow:
|
|
Cool, let's pls update the PR title, add test that it is not changed so we accidentally wont change the behavior and lose device placement... |
ah I didn't notice line 594 do change the device of the original model as then I guess this PR is no longer needed unless we want to modify L548-L550 to any reason why it's implemented the current way? minor difference though, please feel free the close the PR if no change is needed |
|
|
No idea. I think export wants to happen on CPU but why it's done this way in particular I have no idea. @probicheaux if you know please feel free to chime in |
Description
self.model = self.model.to(device)asself.modelis not changed by theexport()function[Original description, already fixed after rebase]
When exporting to onnx, current code prints
instead of
as
self.modelis put toeval()instead ofmodel.Type of change
Please delete options that are not relevant.
How has this change been tested, please provide a testcase or example of how you tested the change?
Any specific deployment considerations
For example, documentation changes, usability, usage/costs, secrets, etc.
Docs