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

Add infer_type_partial #14214

Merged
merged 3 commits into from
Feb 22, 2019
Merged

Add infer_type_partial #14214

merged 3 commits into from
Feb 22, 2019

Conversation

ptrendx
Copy link
Member

@ptrendx ptrendx commented Feb 20, 2019

Description

Add mx.sym.infer_type_partial similar to mx.sym.infer_shape_partial.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@roywei
Copy link
Member

roywei commented Feb 21, 2019

@ptrendx Thanks for the contribution, could you add some unit tests? Thanks!
@mxnet-label-bot add[Backend, pr-awaiting-review]

@marcoabreu marcoabreu added Backend Issues related to the backend of MXNet pr-awaiting-review PR is waiting for code review labels Feb 21, 2019
@szha szha merged commit 87441c3 into apache:master Feb 22, 2019
jessr92 pushed a commit to jessr92/incubator-mxnet that referenced this pull request Feb 28, 2019
* Add infer_type_partial

* Added infer_type_partial to symbol docs main area

* Added test
jessr92 pushed a commit to jessr92/incubator-mxnet that referenced this pull request Feb 28, 2019
* Add infer_type_partial

* Added infer_type_partial to symbol docs main area

* Added test
jessr92 pushed a commit to jessr92/incubator-mxnet that referenced this pull request Feb 28, 2019
* Add infer_type_partial

* Added infer_type_partial to symbol docs main area

* Added test
drivanov pushed a commit to drivanov/incubator-mxnet that referenced this pull request Mar 4, 2019
* Add infer_type_partial

* Added infer_type_partial to symbol docs main area

* Added test
@ThomasDelteil
Copy link
Contributor

@ptrendx this PR broke the tutorials tests because the tutorials are now throwing warnings when loading symbols into Gluon. This happens for loading from onnx or from symbol.

/home/ubuntu/anaconda3/lib/python3.6/site-packages/mxnet/gluon/block.py:1138: UserWarning: Cannot decide type for the following arguments. Consider providing them as input:
	data: None
  input_sym_arg_type = in_param.infer_type()[0]

Should we modify the API of SymbolBlock.imports and the onnx package to specify the type?
http://jenkins.mxnet-ci.amazon-ml.com/job/NightlyTestsForBinaries/job/master/
@szha @ptrendx

@ptrendx
Copy link
Member Author

ptrendx commented Mar 13, 2019

@ThomasDelteil this just makes the behavior consistent between infer_shape and infer_type (infer_shape has exactly the same warning) and more user-friendly (previously infer_type would just silently return (None, None, None) without any clue what was a problem). I guess the _infer_param_types function in Gluon block should just ignore warnings if it expects infer_type to fail.

vdantu pushed a commit to vdantu/incubator-mxnet that referenced this pull request Mar 31, 2019
* Add infer_type_partial

* Added infer_type_partial to symbol docs main area

* Added test
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
* Add infer_type_partial

* Added infer_type_partial to symbol docs main area

* Added test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Backend Issues related to the backend of MXNet pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants