Skip to content

Conversation

Rachel0619
Copy link
Contributor

Part of changes #155023 (parent PR #155429)

  • converted jit_language_reference.rst to jit_language_reference.md

@pytorchbot label "topic: docs"
@pytorchbot label "topic: not user facing"
@pytorchbot label docathon-h1-2025
@pytorchbot label module: docs

Copy link

pytorch-bot bot commented Jun 10, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/155633

Note: Links to docs will display an error until the docs builds have been completed.

❌ 29 New Failures, 6 Cancelled Jobs, 1 Unrelated Failure

As of commit fb99480 with merge base bb43ced (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.


.. _module attributes:
(module-attributes)=
(Module Attributes)=
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
(Module Attributes)=

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there's a :any: at line 146, not sure whether deleting (Module Attributes)= will break that reference

Comment on lines +335 to +352
> For example, assigning to `self` outside of the `__init__()` method:
>
> ```
> @torch.jit.script
> class Foo:
> def assign_x(self):
> self.x = torch.rand(2, 3)
> ```
>
> Will result in:
>
> ```
> RuntimeError:
> Tried to set nonexistent attribute: x. Did you forget to initialize it in __init__()?:
> def assign_x(self):
> self.x = torch.rand(2, 3)
> ~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
> ```
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure why there is a leading > here. Can you explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's for the code block to be visually aligned with the bullet point and it's rendered like this:

image

Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
@Rachel0619 Rachel0619 changed the title converted jit_language_reference.rst to jit_language_reference.md convert jit_language_reference.rst to jit_language_reference.md Jun 11, 2025
@Rachel0619
Copy link
Contributor Author

@pytorchbot label "topic: docs"
@pytorchbot label "module: docs"

@pytorch-bot pytorch-bot bot added the topic: docs topic category label Jun 12, 2025
@janeyx99 janeyx99 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jun 13, 2025
Copy link
Contributor

@svekars svekars left a comment

Choose a reason for hiding this comment

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

LGTM

@svekars
Copy link
Contributor

svekars commented Jun 13, 2025

@pytorchbot merge -f "Docs only change. Do signal is green"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

```

.. _language-reference:
(language-reference)=
Copy link
Contributor

@thatgeeman thatgeeman Jun 15, 2025

Choose a reason for hiding this comment

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

@Rachel0619 shouldnt this be jit_language_reference?

based on a reference here: https://raw.githubusercontent.com/pytorch/pytorch/refs/heads/main/docs/source/jit.rst

CC: @svekars

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @thatgeeman I think in the below code (if that's what you are referring to), they are referencing jit_language_reference.md file and jit_language_reference_v2.md file instead of the headings.

CC: @svekars

.. toctree::
    :maxdepth: 1
    :caption: Language Reference
    :hidden:

    jit_language_reference


.. toctree::
    :maxdepth: 1

    jit_language_reference_v2

@thatgeeman
Copy link
Contributor

thatgeeman commented Jun 16, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docathon-h1-2025 Merged open source topic: docs topic category topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants