-
Notifications
You must be signed in to change notification settings - Fork 487
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
Constant tensor support in burn-import #2008
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2008 +/- ##
==========================================
- Coverage 86.08% 85.96% -0.13%
==========================================
Files 695 695
Lines 89049 89203 +154
==========================================
+ Hits 76656 76680 +24
- Misses 12393 12523 +130 ☔ View full report in Codecov by Sentry. |
I think we should make "an attribute of the model struct and declared during Model::new()". Record loading happens at the module level and we plan to support multi/sub graphs as separate standalone models. |
Regarding testing. Yeah I wish we could store legacy ONNX files but there are a few issues: 1) License and size (which might slow down testing). However, we can probably use a quick python script that deletes other nodes. I think this is supported by onnx package. So we could instruct to remove everything else except a portion and randomize weights (so no copying). |
This PR has been marked as stale because it has not been updated for over a month |
I have reviewed the PR and believe a simpler and more scalable solution would be to extract inputs with initializers for node types such as The solution should follow a similar approach to this script that I use to extract Having said that I think it'd be easier to start with a new PR than making changes. |
Pull Request Template
Checklist
run-checks all
script has been executed.Related Issues/PRs
Only tensor indices is valid
#1915Only tensor input is valid
when converting ONNX model #1593Changes
Fixes 2 issues:
checks for initializers in nodes known to be a problem(currently. EDIT: have to go with option 1 because initializers might be reused, which means tracking name changesAdd
andMul
)this makes a slight non-fix change to scopes, changing variables value from
Vec<TensorVariable>
toTensorVariable
given there is only one variable pushed to each entry. It also registers outputs and checks inputs in the same iteration, which works given the graph is guaranteed to be a DAG.Unresolved questions
which would make it through onnx-ir)? Should we try to detect and notify the user their model is faulty? EDIT: it would fail during TensorType conversion at the latest)Model::new()
? Should we rework constant node type to support Tensors or treat them as a separate beast altogether?Testing
we need to add a model to onnx test, but generating one for issue one might be hard. Could we just add a legacy folder to throw in older models we can't generate directly?