Skip to content

Conversation

@gmagogsfm
Copy link
Contributor

  • Removes references to TorchScript
  • Replace it with a deprecation warning and redirect to torch.export when appropriate

@pytorch-bot
Copy link

pytorch-bot bot commented Jul 10, 2025

🔗 Helpful Links

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

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

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

@@ -1,400 +0,0 @@
"""
Introduction to TorchScript
===========================
Copy link
Contributor

Choose a reason for hiding this comment

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

For all deleted files, please add an entry to https://github.com/pytorch/tutorials/blob/main/redirects.py

>>> print(torch.ops.my_ops.warp_perspective)
<built-in method custom::warp_perspective of PyCapsule object at 0x7ff51c5b7bd0>
TorchScript is deprecated, please use
`torch.export<https://docs.pytorch.org/tutorials/intermediate/torch_export_tutorial.html>`_ instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add an issue for all these pages with warning like this with the plan to delete them by {date} or {release}

@svekars svekars added the tutorials_audit used on tutorial audit PRs label Jul 11, 2025
@sekyondaMeta
Copy link
Contributor

@yiming0416
Copy link
Contributor

@svekars The warnings and redirect entries have been added. Can you pls review again?

@svekars
Copy link
Contributor

svekars commented Jul 14, 2025

It looks good to me - thanks for creating the issue, too.

@gmagogsfm gmagogsfm marked this pull request as ready for review July 14, 2025 22:25
@svekars svekars merged commit d5cd489 into pytorch:main Jul 14, 2025
19 of 20 checks passed
svekars added a commit that referenced this pull request Jul 17, 2025
* Remove references to TorchScript in docs
* Add missing todo and redirects
---------

Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
Co-authored-by: Yiming Zhou <yimingzhou@meta.com>
angelayi added a commit that referenced this pull request Sep 10, 2025
Reverts part of #3453 which
removed the Custom Class tutorial

Custom classes are a generic concept in PyTorch. Although it was
developed for TorchScript, it is also supported in Pytorch 2.0 as many
users (like TensorRT and internal Ads frameworks) rely on it. Therefore,
we should not delete this tutorial.

Additionally the [Custom Class x PT2
tutorial](https://docs.pytorch.org/tutorials/advanced/custom_class_pt2.html)
also references this tutorial, although CI did not seem to catch the
broken link (cc @svekars)

As part of revert, I removed references to TS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed tutorials_audit used on tutorial audit PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants