-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[ONNX] Refactoring serialization of ONNX initializers to be name-based (Resubmission) #17830
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
[ONNX] Refactoring serialization of ONNX initializers to be name-based (Resubmission) #17830
Conversation
|
Apparently, this break several internal pipelines... I need more time to investigate what's going on. |
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.
Put it on hold before the internal tests pass.
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.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@houseroad - OK. Could it be because of the order the initializers are written to the ONNX file, because that may change for some graphs with this change? But that should be a one-time update to the expect file. |
6b45432 to
f48e2ec
Compare
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.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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.
The problem is only triggered when we set input_names and using non-protobuf serialization format (e.g., ZIP_ARCHIVE). We should add a test case to guard such situation.
f48e2ec to
fb28b81
Compare
|
Fixed the issue with setting input_names and using non-protobuf serialization format (e.g., ZIP_ARCHIVE). Also added a test for guarding against that. |
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.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
15ac29e to
451894e
Compare
451894e to
1a8220b
Compare
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.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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.
Let's add a test case to cover the input_names conflict with existing parameter names.
Something like model has 2 parameters and 1 input.
export(model, input_names=['input1', 'p2']) and the second parameter's name is p2, and it will be renamed to p2.1 after exporting to onnx.
1a8220b to
d5f87f5
Compare
|
Moved the |
d5f87f5 to
bf4ae98
Compare
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.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@houseroad - the failures seem unrelated. I have seen some of them in previous runs as well. |
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! Finally, we fixed all the problems.
Left some nits.
…es and not order.
…alization of initializers.
bf4ae98 to
13c5516
Compare
|
@houseroad - Great to hear that all tests are passing. Thanks for your tremendous help! |
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.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@houseroad merged this pull request in 1240327. |
@houseroad - this is the resubmission of #17420, as suggested.