[ONNX] Refactoring serialization of ONNX initializers to be name-based (Resubmission)#17830
[ONNX] Refactoring serialization of ONNX initializers to be name-based (Resubmission)#17830spandantiwari wants to merge 14 commits intopytorch:masterfrom
Conversation
|
Apparently, this break several internal pipelines... I need more time to investigate what's going on. |
houseroad
left a comment
There was a problem hiding this comment.
Put it on hold before the internal tests pass.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@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
facebook-github-bot
left a comment
There was a problem hiding this comment.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
houseroad
left a comment
There was a problem hiding this comment.
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. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@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
facebook-github-bot
left a comment
There was a problem hiding this comment.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
houseroad
left a comment
There was a problem hiding this comment.
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
facebook-github-bot
left a comment
There was a problem hiding this comment.
@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. |
houseroad
left a comment
There was a problem hiding this comment.
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! |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@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.