-
Notifications
You must be signed in to change notification settings - Fork 443
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
burn_import::onnx::ModelGen hangs in build.rs if record type is NamedMpkGz #952
Comments
Thanks for reporting. Are you able to share your ONNX file so that we attempt to recreate the issue? |
Hi, thanks for the fast response. https://drive.google.com/file/d/1pt7aOK_4zrQYW3bs6bSpRKk0Lhr5OOg6/view?usp=drive_link |
Yes. I can confirm the build keeps going. I am not sure what the root cause yet. I'll report back. |
OK. I have narrowed down the problem. If the record type is named message pack compressed (RecordType::NamedMpkGz), it will hang but other record types work. NamedMpkGz is default record type. The following will work (the build should be fast): ModelGen::new()
.input("src/model/identifier.onnx")
.out_dir("model/")
.record_type(RecordType::NamedMpk)
.embed_states(false)
.run_from_script(); Or ModelGen::new()
.input("src/model/identifier.onnx")
.out_dir("model/")
.record_type(RecordType::Bincode)
.embed_states(false)
.run_from_script(); Or ModelGen::new()
.input("src/model/identifier.onnx")
.out_dir("model/")
.record_type(RecordType::PrettyJson)
.embed_states(false)
.run_from_script(); This will hang: ModelGen::new()
.input("src/model/identifier.onnx")
.out_dir("model/")
.record_type(RecordType::NamedMpkGz)
.embed_states(false)
.run_from_script(); So for now as a workaround, I recommend using CCing @nathanielsimard , so he's aware of this. |
@seftontycho , let us know if the workaround works for you. I can confirm all ops in your ONNX should be supported (at least they are compiled). I did not run the model. |
I can confirm that this works! |
Great! We will investigate the root cause for NamedMpkGz and will have a fix. |
This temporarily workaround of tracel-ai#952 bug.
* Change ONNX default record type to NamedMpk This temporarily workaround of #952 bug. * Fix formatting * Fix URL in the doc
In #1019 PR, I changed the default recordtype to be |
This possibly fixes this: tracel-ai#3 Caused by this: tracel-ai/burn#952
We decided not to support compressed Gz version. Closing it. |
I have the following build.rs file that I have copied from https://burn.dev/book/import/onnx-model.html.
When I try to build it gets to my_crate_name(build) and then never completes.
I have waited for 2 hours and nothing.
No errors are thrown either.
identifier.onnx is a resnet50 model that I exported from pytorch.
Any ideas what I am doing wrong?
The text was updated successfully, but these errors were encountered: