Skip to content

Add the Latest Features For Basics Autograd Tutorial #3395

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

ParagEkbote
Copy link

@ParagEkbote ParagEkbote commented Jun 13, 2025

Fixes #3119

As described in the issue, I have updated the tutorial to address the latest visualization tools and add the autograd mechanics tutorial link to it as well. Could you please review?

Description

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.

cc @subramen @albanD @jbschlosser @svekars

Copy link

pytorch-bot bot commented Jun 13, 2025

🔗 Helpful Links

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

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

✅ No Failures

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

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

Copy link

pytorch-bot bot commented Jun 13, 2025

Didn't find following labels among repository labels: topic: core,topic: intro

@ParagEkbote
Copy link
Author

@pytorchbot label core

@pytorch-bot pytorch-bot bot added the core Tutorials of any level of difficulty related to the core pytorch functionality label Jun 13, 2025
@ParagEkbote
Copy link
Author

@pytorchbot label intro

@pytorch-bot pytorch-bot bot added the intro label Jun 13, 2025
@ParagEkbote ParagEkbote marked this pull request as ready for review June 13, 2025 13:43
@ParagEkbote
Copy link
Author

Could you please review the changes?

cc: @subramen @albanD @jbschlosser @svekars

@albanD albanD requested a review from soulitzer June 20, 2025 21:25
Copy link
Contributor

@soulitzer soulitzer left a comment

Choose a reason for hiding this comment

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

Thanks for addition, I added some comments

@@ -160,6 +161,39 @@
# - accumulates them in the respective tensor’s ``.grad`` attribute
# - using the chain rule, propagates all the way to the leaf tensors.
#
# We can also visualize the computational graph by the following 2 methods:
Copy link
Contributor

@soulitzer soulitzer Jun 25, 2025

Choose a reason for hiding this comment

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

I think for this section, we can just keep it short for now, and link to the relevant resource:

To get a sense of what this computational graph looks like we can use the following tools:

1. torchviz is a package to visualize computational graphs
https://github.com/szagoruyko/pytorchviz

2. TORCH_LOGS="+autograd" enables logging for the backward pass. 
https://dev-discuss.pytorch.org/t/highlighting-a-few-recent-autograd-features-h2-2023/1787

(for the links use the proper hyperlink syntax)

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@ParagEkbote ParagEkbote requested a review from soulitzer June 26, 2025 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed core Tutorials of any level of difficulty related to the core pytorch functionality intro
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💡 [REQUEST] Add the latest PyTorch features into basics Autograd tutorial
3 participants