Skip to content

Conversation

jiannanWang
Copy link
Contributor

@jiannanWang jiannanWang commented Sep 29, 2025

Fixes T237454989.

Description

This PR removes the empty "Example" sections from the tutorial. These sections were intended to be redundant, but currently contain no content, as shown below. This PR deletes them since they do not provide any additional value.

It also adds requirement for torch and numpy packages.

Screenshot 2025-09-29 at 10 30 10 AM

Checklist

  • The issue that is being fixed is referred in the description (see above "Fixes #ISSUE_NUMBER")
  • Only one issue is addressed in this pull request
  • Labels from the issue that this PR is fixing are added to this pull request
  • No unnecessary issues are included into this pull request.

Copy link

pytorch-bot bot commented Sep 29, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit ade91f7 with merge base f526f25 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@meta-cla meta-cla bot added the cla signed label Sep 29, 2025
@svekars
Copy link
Contributor

svekars commented Sep 29, 2025

I think those shouldn't be deleted. you can remove :hidden: from the toctrees so the list of sections appear.

@jiannanWang
Copy link
Contributor Author

I think those shouldn't be deleted. you can remove :hidden: from the toctrees so the list of sections appear.

Got it. I reverted the sections and removed :hidden: from the section.

@svekars svekars added tutorials_audit used on tutorial audit PRs pytorch_doc_audit labels Sep 29, 2025
@svekars
Copy link
Contributor

svekars commented Sep 29, 2025

Did you have a chance to go over all the sections under Learning PyTorch with Examples:

https://docs-preview.pytorch.org/pytorch/tutorials/3600/beginner/pytorch_with_examples.html

@jiannanWang
Copy link
Contributor Author

Did you have a chance to go over all the sections under Learning PyTorch with Examples:

https://docs-preview.pytorch.org/pytorch/tutorials/3600/beginner/pytorch_with_examples.html

I ran all the code examples listed on the page, including:

beginner_source/examples_tensor/polynomial_numpy.py
beginner_source/examples_tensor/polynomial_tensor.py
beginner_source/examples_autograd/polynomial_autograd.py
beginner_source/examples_autograd/polynomial_custom_function.py
beginner_source/examples_nn/dynamic_net.py
beginner_source/examples_nn/polynomial_module.py
beginner_source/examples_nn/polynomial_module.py
beginner_source/examples_nn/polynomial_optim.py

All code ran successfully, with no deprecation warnings or errors.

The links to other pages are initially hidden. I reviewed them and noticed that the documentation uses pi instead of \pi in several places, which causes display errors. I have corrected these typos.

@svekars svekars merged commit 387be4c into pytorch:main Sep 29, 2025
21 checks passed
jafraustro pushed a commit to jafraustro/tutorials that referenced this pull request Oct 1, 2025
Fixes
[T237454989](https://www.internalfb.com/intern/tasks/?t=237454989).

Ran and verified that these examples work:

beginner_source/examples_tensor/polynomial_numpy.py
beginner_source/examples_tensor/polynomial_tensor.py
beginner_source/examples_autograd/polynomial_autograd.py
beginner_source/examples_autograd/polynomial_custom_function.py
beginner_source/examples_nn/dynamic_net.py
beginner_source/examples_nn/polynomial_module.py
beginner_source/examples_nn/polynomial_module.py
beginner_source/examples_nn/polynomial_optim.py
jafraustro pushed a commit to jafraustro/tutorials that referenced this pull request Oct 1, 2025
Fixes
[T237454989](https://www.internalfb.com/intern/tasks/?t=237454989).

Ran and verified that these examples work:

beginner_source/examples_tensor/polynomial_numpy.py
beginner_source/examples_tensor/polynomial_tensor.py
beginner_source/examples_autograd/polynomial_autograd.py
beginner_source/examples_autograd/polynomial_custom_function.py
beginner_source/examples_nn/dynamic_net.py
beginner_source/examples_nn/polynomial_module.py
beginner_source/examples_nn/polynomial_module.py
beginner_source/examples_nn/polynomial_optim.py
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.

2 participants