Skip to content
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

[Relay][ONNX] fix #3134 converter where initializers were not registered as nodes #3143

Merged
merged 6 commits into from
May 20, 2019

Conversation

zhreshold
Copy link
Member

Fix a keyerror when onnx initializers are not registered as nodes.

@@ -898,7 +898,7 @@ def __init__(self, shape, dtype):
self._renames = {}
self._num_input = 0
self._num_param = 0
self._shape = shape
self._shape = shape if shape else {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for error reporting reasons?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, otherwise pulling value from None is ambiguous error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, just ping me when CI is green and I will merge. Any thoughts on being robust to non-topo sorted models?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.
For non-topo onnx models, I guess it's doable. However I am not conviced so far to bring in a sorting function purely for what should supposed to be fixed by onnx/keras-onnx

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I agree, we shouldn't be fixing others bugs, is there some where that states it must be topo-sorted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, I think we should add a note in the docs as a warning, what do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also saw there are some onnx utilities which check the graph, do you know if these check topo. ordering?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually onnx checker is a good idea

@zhreshold zhreshold force-pushed the key-error-relay-onnx branch from 59601d3 to b4deb62 Compare May 8, 2019 16:54
@zhreshold
Copy link
Member Author

the ci consistently fails at ./test/scripts/task_cpp_unittest.sh which I think has nothing to do with this PR right?

@zhreshold zhreshold force-pushed the key-error-relay-onnx branch from 16b984e to a248652 Compare May 10, 2019 05:58
@jroesch
Copy link
Member

jroesch commented May 11, 2019

It looks like CI is broken, can you try to trigger a rebuild later today. I'll merge once CI is green.

@zhreshold zhreshold force-pushed the key-error-relay-onnx branch from a248652 to f6e9ef1 Compare May 13, 2019 17:45
@zhreshold zhreshold force-pushed the key-error-relay-onnx branch from bc3cbea to 33b5089 Compare May 16, 2019 23:56
@zhreshold
Copy link
Member Author

@jroesch CI is green now.

@tqchen tqchen merged commit 3a9de90 into apache:master May 20, 2019
@tqchen
Copy link
Member

tqchen commented May 20, 2019

Thanks, @zhreshold @jroesch this is now merged

wweic pushed a commit to wweic/tvm that referenced this pull request Jun 26, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants