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

[quant][eagermode] Move custom_module registration to prepare/convert_custom_config_dict #46293

Closed
wants to merge 3 commits into from

Conversation

jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Oct 13, 2020

Stack from ghstack:

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D24290811

…_custom_config_dict

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…are/convert_custom_config_dict"

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D24290811](https://our.internmc.facebook.com/intern/diff/D24290811)

[ghstack-poisoned]
@dr-ci
Copy link

dr-ci bot commented Oct 13, 2020

💊 CI failures summary and remediations

As of commit 8ce1bc6 (more details on the Dr. CI page):


  • 5/5 failures possibly* introduced in this PR
    • 1/5 non-CircleCI failure(s)---

4 failures not recognized by patterns:

Job Step Action
CircleCI pytorch_python_doc_build Doc Build and Push 🔁 rerun
CircleCI pytorch_bazel_test Test 🔁 rerun
CircleCI pytorch_libtorch_linux_xenial_cuda11_0_cudnn8_py3_gcc7_build Build 🔁 rerun
CircleCI pytorch_doc_test Doc test 🔁 rerun

🚧 2 fixed upstream failures:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

If your commit is newer than viable/strict, you can try basing on an older, stable commit:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase --onto FETCH_HEAD $(git merge-base origin/master HEAD)

If your commit is older than viable/strict:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

Check out the recency history of this "viable master" tracking branch.


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 13 times.

…are/convert_custom_config_dict"

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D24290811](https://our.internmc.facebook.com/intern/diff/D24290811)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3ad797c.

@mruberry
Copy link
Collaborator

Unlanding. This broke the docs build. Relevant snippet:

Oct 14 20:44:57 /opt/conda/lib/python3.6/site-packages/torch/quantization/quantize.py:docstring of torch.quantization.prepare:20: WARNING: Block quote ends without a blank line; unexpected unindent.
Oct 14 20:44:57 /opt/conda/lib/python3.6/site-packages/torch/quantization/quantize.py:docstring of torch.quantization.convert:16: WARNING: Unexpected indentation.
Oct 14 20:44:57 /opt/conda/lib/python3.6/site-packages/torch/quantization/quantize.py:docstring of torch.quantization.convert:17: WARNING: Block quote ends without a blank line; unexpected unindent.

@jerryzh168
Copy link
Contributor Author

jerryzh168 commented Oct 14, 2020

Unlanding. This broke the docs build. Relevant snippet:

Oct 14 20:44:57 /opt/conda/lib/python3.6/site-packages/torch/quantization/quantize.py:docstring of torch.quantization.prepare:20: WARNING: Block quote ends without a blank line; unexpected unindent.
Oct 14 20:44:57 /opt/conda/lib/python3.6/site-packages/torch/quantization/quantize.py:docstring of torch.quantization.convert:16: WARNING: Unexpected indentation.
Oct 14 20:44:57 /opt/conda/lib/python3.6/site-packages/torch/quantization/quantize.py:docstring of torch.quantization.convert:17: WARNING: Block quote ends without a blank line; unexpected unindent.

oh, didn't notice that, I thought it was because of

Oct 14 01:08:03 /opt/conda/lib/python3.6/site-packages/torch/jit/_recursive.py:195: UserWarning: 'mods' was found in ScriptModule constants,  but it is a non-constant submodule. Consider removing it.
Oct 14 01:08:03   " but it is a non-constant {}. Consider removing it.".format(name, hint))
Oct 14 01:08:03 /opt/conda/lib/python3.6/site-packages/torch/jit/_trace.py:804: TracerWarning: Trace had nondeterministic nodes. Did you forget call .eval() on your model? Nodes:
Oct 14 01:08:03 	%13 : Float(4, strides=[1], requires_grad=0, device=cpu) = aten::rand(%8, %9, %10, %11, %12) # <doctest default[0]>:2:0
Oct 14 01:08:03 This may cause errors in trace checking. To disable trace checking, pass check_trace=False to torch.jit.trace()
Oct 14 01:08:03   _module_class,
Oct 14 01:08:03 /opt/conda/lib/python3.6/site-packages/torch/jit/_trace.py:804: TracerWarning: Output nr 1. of the traced function does not match the corresponding output of the Python function. Detailed error:
Oct 14 01:08:03 With rtol=1e-05 and atol=1e-05, found 4 element(s) (out of 12) whose difference(s) exceeded the margin of error (including 0 nan comparisons). The greatest difference was 0.8969195485115051 (0.0034521818161010742 vs. 0.9003717303276062), which occurred at index (0, 2).
Oct 14 01:08:03   _module_class,
Oct 14 01:08:03 /opt/conda/lib/python3.6/site-packages/torch/jit/_trace.py:804: TracerWarning: Trace had nondeterministic nodes. Did you forget call .eval() on your model? Nodes:
Oct 14 01:08:03 	%14 : Float(1, 4, strides=[4, 1], requires_grad=0, device=cpu) = aten::rand(%9, %10, %11, %12, %13) # <doctest default[0]>:2:0
Oct 14 01:08:03 This may cause errors in trace checking. To disable trace checking, pass check_trace=False to torch.jit.trace()
Oct 14 01:08:03   _module_class,
Oct 14 01:08:03 /opt/conda/lib/python3.6/site-packages/torch/jit/_trace.py:804: TracerWarning: Output nr 1. of the traced function does not match the corresponding output of the Python function. Detailed error:
Oct 14 01:08:03 With rtol=1e-05 and atol=1e-05, found 4 element(s) (out of 8) whose difference(s) exceeded the margin of error (including 0 nan comparisons). The greatest difference was 0.8881369233131409 (0.06778597831726074 vs. 0.9559229016304016), which occurred at index (0, 0).
Oct 14 01:08:03   _module_class,

can we make the error more explicit next time? why the quantization error does not appear in "Doctest summary"?

@mruberry
Copy link
Collaborator

Unlanding. This broke the docs build. Relevant snippet:

Oct 14 20:44:57 /opt/conda/lib/python3.6/site-packages/torch/quantization/quantize.py:docstring of torch.quantization.prepare:20: WARNING: Block quote ends without a blank line; unexpected unindent.
Oct 14 20:44:57 /opt/conda/lib/python3.6/site-packages/torch/quantization/quantize.py:docstring of torch.quantization.convert:16: WARNING: Unexpected indentation.
Oct 14 20:44:57 /opt/conda/lib/python3.6/site-packages/torch/quantization/quantize.py:docstring of torch.quantization.convert:17: WARNING: Block quote ends without a blank line; unexpected unindent.

oh, didn't notice that, I thought it was because of

Oct 14 01:08:03 /opt/conda/lib/python3.6/site-packages/torch/jit/_recursive.py:195: UserWarning: 'mods' was found in ScriptModule constants,  but it is a non-constant submodule. Consider removing it.
Oct 14 01:08:03   " but it is a non-constant {}. Consider removing it.".format(name, hint))
Oct 14 01:08:03 /opt/conda/lib/python3.6/site-packages/torch/jit/_trace.py:804: TracerWarning: Trace had nondeterministic nodes. Did you forget call .eval() on your model? Nodes:
Oct 14 01:08:03 	%13 : Float(4, strides=[1], requires_grad=0, device=cpu) = aten::rand(%8, %9, %10, %11, %12) # <doctest default[0]>:2:0
Oct 14 01:08:03 This may cause errors in trace checking. To disable trace checking, pass check_trace=False to torch.jit.trace()
Oct 14 01:08:03   _module_class,
Oct 14 01:08:03 /opt/conda/lib/python3.6/site-packages/torch/jit/_trace.py:804: TracerWarning: Output nr 1. of the traced function does not match the corresponding output of the Python function. Detailed error:
Oct 14 01:08:03 With rtol=1e-05 and atol=1e-05, found 4 element(s) (out of 12) whose difference(s) exceeded the margin of error (including 0 nan comparisons). The greatest difference was 0.8969195485115051 (0.0034521818161010742 vs. 0.9003717303276062), which occurred at index (0, 2).
Oct 14 01:08:03   _module_class,
Oct 14 01:08:03 /opt/conda/lib/python3.6/site-packages/torch/jit/_trace.py:804: TracerWarning: Trace had nondeterministic nodes. Did you forget call .eval() on your model? Nodes:
Oct 14 01:08:03 	%14 : Float(1, 4, strides=[4, 1], requires_grad=0, device=cpu) = aten::rand(%9, %10, %11, %12, %13) # <doctest default[0]>:2:0
Oct 14 01:08:03 This may cause errors in trace checking. To disable trace checking, pass check_trace=False to torch.jit.trace()
Oct 14 01:08:03   _module_class,
Oct 14 01:08:03 /opt/conda/lib/python3.6/site-packages/torch/jit/_trace.py:804: TracerWarning: Output nr 1. of the traced function does not match the corresponding output of the Python function. Detailed error:
Oct 14 01:08:03 With rtol=1e-05 and atol=1e-05, found 4 element(s) (out of 8) whose difference(s) exceeded the margin of error (including 0 nan comparisons). The greatest difference was 0.8881369233131409 (0.06778597831726074 vs. 0.9559229016304016), which occurred at index (0, 0).
Oct 14 01:08:03   _module_class,

can we make the error more explicit next time? why the quantization error does not appear in "Doctest summary"?

It IS confusing! @rgommers, let's consider improving this?

jerryzh168 added a commit that referenced this pull request Oct 14, 2020
…/convert_custom_config_dict (#46293)

Summary: Pull Request resolved: #46293

Test Plan: Imported from OSS

Reviewed By: raghuramank100
ghstack-source-id: ddcc9e2af4c80def4381d132743103a28fd4c55a
jerryzh168 added a commit that referenced this pull request Oct 14, 2020
…/convert_custom_config_dict (#46293)

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 14, 2020
…/convert_custom_config_dict (#46293)

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

ghstack-source-id: ddcc9e2af4c80def4381d132743103a28fd4c55a
Pull Request resolved: #46364
@rgommers
Copy link
Collaborator

rgommers commented Oct 15, 2020

What would you liked to have seen, something like?


NOTE: Sphinx warnings are turned into CI errors, this build is not clean!

right at the bottom of the pytorch_python_doc_build job, to make clear what is going on?

Current behaviour looks okay to me, but I realize that many devs aren't familiar with Sphinx and hence the build log may be hard to interpret.

Cc @mattip

@mattip
Copy link
Collaborator

mattip commented Oct 15, 2020

Maybe this could be part of the logic in DrCI ?

jerryzh168 added a commit that referenced this pull request Oct 15, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 15, 2020
…/convert_custom_config_dict (#46293)

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

ghstack-source-id: 9be87cbc6386da97c39355b09097530ece9ff9f4
Pull Request resolved: #46364
jerryzh168 added a commit that referenced this pull request Oct 15, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 15, 2020
…/convert_custom_config_dict (#46293)

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

ghstack-source-id: 60ab2608d0340b54fae28f3cf855f004e312fd20
Pull Request resolved: #46364
jerryzh168 added a commit that referenced this pull request Oct 15, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 15, 2020
…/convert_custom_config_dict (#46293)

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

ghstack-source-id: 3b00e66fcda9a2fc3e04c1e17318f27284b52f58
Pull Request resolved: #46364
jerryzh168 added a commit that referenced this pull request Oct 15, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 15, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 15, 2020
…/convert_custom_config_dict (#46293)

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

ghstack-source-id: 7691d8a77ff6555dee1e6cf2fb6315f28a2c00c5
Pull Request resolved: #46364
jerryzh168 added a commit that referenced this pull request Oct 16, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 16, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 16, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 16, 2020
…/convert_custom_config_dict (#46293)

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

ghstack-source-id: 025c580592f27237b747f6db0bdca4c809538b70
Pull Request resolved: #46364
jerryzh168 added a commit that referenced this pull request Oct 16, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 16, 2020
…/convert_custom_config_dict (#46293)

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

ghstack-source-id: 6c5fa5c2324b56aea849a42d217bb3c7a968b2ef
Pull Request resolved: #46364
jerryzh168 added a commit that referenced this pull request Oct 16, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 16, 2020
…/convert_custom_config_dict (#46293)

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

ghstack-source-id: 2c9a7c2bf860761b08d037038c2b99efe1848677
Pull Request resolved: #46364
jerryzh168 added a commit that referenced this pull request Oct 16, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 16, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 16, 2020
…/convert_custom_config_dict (#46293)

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

ghstack-source-id: 679f2e1057b465de6c63e6ff5cb566c694a924fa
Pull Request resolved: #46364
jerryzh168 added a commit that referenced this pull request Oct 19, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 19, 2020
… to prepare/convert_custom_config_dict (#46293)"

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

Differential Revision: [D24322747](https://our.internmc.facebook.com/intern/diff/D24322747)

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 19, 2020
…/convert_custom_config_dict (#46293)

Summary:

Test Plan: Imported from OSS

Reviewed By: raghuramank100

ghstack-source-id: c05d29d7e4ec494942ead88e6688b2c4135c1ed3
Pull Request resolved: #46364
facebook-github-bot pushed a commit that referenced this pull request Oct 19, 2020
…/convert_custom_config_dict (#46293) (#46364)

Summary: Pull Request resolved: #46364

Test Plan:
Imported from OSS

Imported from OSS

Reviewed By: vkuzo

Differential Revision: D24322747

fbshipit-source-id: 4801ba1835fc805bf767fe9810b9edfa2ceeefb4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants