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

Move constants in InferenceParameters into ParameterDict #145

Closed
wants to merge 5 commits into from

Conversation

meissnereric
Copy link
Contributor

Description of changes:
Shift MXNet based constants from being stored in the InferenceParameters._constants dictionary (which still exists and keeps scalar/native constants) to keeping MXNet constants in the ParameterDict where other Parameters are kept.

This removes the need for the separate MXNet constants file at serialization file as well!

(Feel free to ignore the documentation change here, it's a remnant of the larger docs change I made in another PR and I'll try to make sure the other one is the one that gets kept.)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@meissnereric meissnereric added the enhancement New feature or request label Jan 21, 2019
@zhenwendai
Copy link
Contributor

@meissnereric could you look into the reason that the test cases fail?

@meissnereric
Copy link
Contributor Author

Yeah sure, they passed locally for me.

@meissnereric
Copy link
Contributor Author

Appears to be an issue in how MXNet differs in Python 3.4/5 from 3.6 which changes the gradient calculations of Constants. This is probably why only the ScoreFunction tests break since they're the only ones where we numerically check gradients.

I can replicate it by running the tests in Python 3.4/5, and reverting the Constant changes make the tests pass again.

@zhenwendai
Copy link
Contributor

Could we identify which API of mxnet changes behaviors between 3.4/3.5 and 3.6?

Copy link
Contributor

@zhenwendai zhenwendai left a comment

Choose a reason for hiding this comment

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

I am not sure whether we want to go ahead with the changes about constant, but I like the documentation about inference. We should definitely merge the documentation part.

docs/design_documents/inference.md Outdated Show resolved Hide resolved
docs/design_documents/inference.md Outdated Show resolved Hide resolved
docs/design_documents/inference.md Outdated Show resolved Hide resolved
docs/design_documents/inference.md Outdated Show resolved Hide resolved
docs/design_documents/inference.md Outdated Show resolved Hide resolved
docs/design_documents/inference.md Outdated Show resolved Hide resolved
docs/design_documents/inference.md Outdated Show resolved Hide resolved
docs/design_documents/inference.md Outdated Show resolved Hide resolved
Co-Authored-By: meissnereric <meissner.eric.7@gmail.com>
@zhenwendai zhenwendai closed this Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants