Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[v1.9.x] ONNX fix node output sort #20327

Merged
merged 5 commits into from Jun 3, 2021
Merged

[v1.9.x] ONNX fix node output sort #20327

merged 5 commits into from Jun 3, 2021

Conversation

waytrue17
Copy link
Contributor

Description

Backport #20326.

Checklist

Essentials

  • PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented

Changes

  • Feature1, tests, (and when applicable, API doc)
  • Feature2, tests, (and when applicable, API doc)

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@waytrue17 waytrue17 requested a review from szha as a code owner June 3, 2021 02:22
@mxnet-bot
Copy link

Hey @waytrue17 , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [sanity, unix-cpu, edge, centos-cpu, miscellaneous, website, windows-gpu, windows-cpu, unix-gpu, clang, centos-gpu]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test labels Jun 3, 2021
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Jun 3, 2021
@Zha0q1
Copy link
Contributor

Zha0q1 commented Jun 3, 2021

the pylint warning basically means that len(name) are keep being redefined in each loop iteration. refer to https://stackoverflow.com/questions/25314547/cell-var-from-loop-warning-from-pylint
this is actually what we intended but to make it more formal we can change

def str2int(s):

to

def str2int(s, name):
...

node_output_names = sorted(node_output_names, key=lambda x: str2int(x, name))

@waytrue17
Copy link
Contributor Author

the pylint warning basically means that len(name) are keep being redefined in each loop iteration. refer to https://stackoverflow.com/questions/25314547/cell-var-from-loop-warning-from-pylint
this is actually what we intended but to make it more formal we can change

def str2int(s):

to

def str2int(s, name):
...

node_output_names = sorted(node_output_names, key=lambda x: str2int(x, name))

Thanks for the heads-up!

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Jun 3, 2021
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test and removed pr-work-in-progress PR is still work in progress labels Jun 3, 2021
@mseth10 mseth10 added pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review and removed pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress labels Jun 3, 2021
@Zha0q1 Zha0q1 merged commit 579a631 into apache:v1.9.x Jun 3, 2021
@waytrue17 waytrue17 deleted the onnx-1.9 branch July 7, 2021 20:18
@waytrue17 waytrue17 restored the onnx-1.9 branch July 7, 2021 20:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants