-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[docs] Add starter content for new TorchScript language reference #52494
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
Conversation
💊 CI failures summary and remediationsAs of commit 7f15e04 (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
The primary must evaluate to an object that supports subscription. If it is a ``List`` , ``Tuple``, or ``str``, | ||
the expression list must evaluate to an integer or slice. If it is a ``Dict``, the expression list must evaluate | ||
to an object of the same type as the key type of the ``Dict``. If the primary is a ``ModuleList``, the expression | ||
list must be an ``integer`` literal. If the primary is a ``ModuleDict``, the expression must be a ``stringliteral``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do indices on ModuleList and ModuleDict still need to be literals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say yes; subscriptions can appear in other contexts in addition to the RHS of an assignment. Using non-literal subscripts is allowed for annotated assignment, but not for any subscription in which the primary is a ModuleList
or ModuleDict
.
9dc3579
to
9890fc0
Compare
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
9890fc0
to
7f15e04
Compare
**Summary** This commit adds information about type annotation and inference to the updated language specification. It will be rebased on top of #52494 after it lands. **Test Plan** Continuous integration.
Here's a preview of the file. https://11416809-65600975-gh.circle-artifacts.com/0/docs/jit_language_reference_v2.html (You can find these in the artifacts for pytorch_python_doc_build.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SplitInfinity has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SplitInfinity has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@SplitInfinity merged this pull request in d49c5c7. |
|
||
torch.jit.trace = trace_wrapper | ||
|
||
.. _language-reference: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is causing sphinx to choke with
source/jit_language_reference_v2.rst:30: WARNING: duplicate label \
language-reference, other instance in \
... docs/source/jit_language_reference.rst
One of them should be renamed
@brianjo
This pull request has been reverted by ffac9b2. |
Thanks @mattip! The |
:(. I recently added the message on the failing build:
So that is what I did. Maybe facebook-github-bot could be extended to recognize this failure mode and give more guidance? |
I saw that, but I couldn't find anything incriminating in the logs. Although, I am much more used to seeing compiler and test output, and as you said, the facebook-github-bot does a better job of displaying the specific errors related to compilation and test errors. |
…53673) Summary: **Summary** This commit adds information about type annotation and inference to the updated language specification. It will be rebased on top of #52494 after it lands. **Test Plan** Continuous integration. Screen capture: https://user-images.githubusercontent.com/4392003/110560184-66371f80-80fa-11eb-803a-923cf8de25ff.mov Pull Request resolved: #53673 Reviewed By: gmagogsfm Differential Revision: D27413001 Pulled By: SplitInfinity fbshipit-source-id: b54b300b4b1f10537ec06e2ee9eeb6d2b1f1810b
…torch#52494) Summary: **Summary** This commit adds a new .rst file to use for updating the language specification and prepopulates it with the updated content for the expressions section. **Test Plan** https://user-images.githubusercontent.com/4392003/110441235-638ee880-806e-11eb-83ae-3b908bf00d5b.mov Pull Request resolved: pytorch#52494 Reviewed By: nikithamalgifb Differential Revision: D26965463 Pulled By: SplitInfinity fbshipit-source-id: 246c76a56d911a8061e720abd200a44d7dfa1f35
Summary
This commit adds a new .rst file to use for updating the language specification and prepopulates it with the updated content for the expressions section.
Test Plan
https://user-images.githubusercontent.com/4392003/110441235-638ee880-806e-11eb-83ae-3b908bf00d5b.mov