Make functorch notebook symlinks PEP 517 valid (#157813)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/157813
Approved by: https://github.com/zou3519, https://github.com/atalman
This commit is contained in:
Klaus Zimmermann
2025-09-11 14:27:34 +02:00
committed by PyTorch MergeBot
parent 872ed60679
commit 31345fb4f7
17 changed files with 19 additions and 21 deletions

View File

@ -73,7 +73,7 @@ exclude =
./docs/src,
./functorch/docs,
./functorch/examples,
./functorch/notebooks,
./functorch/docs/source/tutorials,
./scripts,
./test/generated_type_hints_smoketest.py,
./third_party,

View File

@ -13,7 +13,7 @@ exclude_patterns = [
'**/fb/**',
'functorch/docs/**',
'functorch/examples/**',
'functorch/notebooks/**',
'functorch/docs/source/tutorials/**',
'torch/_inductor/fx_passes/serialized_patterns/**',
'torch/_inductor/autoheuristic/artifacts/**',
'scripts/**',
@ -1568,7 +1568,6 @@ include_patterns = [
exclude_patterns = [
'caffe2/**',
'functorch/docs/**',
'functorch/notebooks/**',
'torch/_inductor/fx_passes/serialized_patterns/**',
'torch/_inductor/autoheuristic/artifacts/**',
'test/dynamo/cpython/**',

View File

@ -72,4 +72,4 @@ aot_function(f, ts_compiler, ts_compiler)(torch.randn(3, requires_grad=True))
* Min-cut [recomputation](https://dev-discuss.pytorch.org/t/min-cut-optimal-recomputation-i-e-activation-checkpointing-with-aotautograd/467) with AOT Autograd.
## Tutorials
You can use this [tutorial](https://pytorch.org/functorch/nightly/notebooks/aot_autograd_optimizations.html) to play with AOT Autograd.
You can use this [tutorial](https://pytorch.org/functorch/nightly/tutorials/aot_autograd_optimizations.html) to play with AOT Autograd.

View File

@ -50,7 +50,7 @@ extensions = [
"myst_nb",
]
# sys.path.insert(0, os.path.abspath('./notebooks'))
# sys.path.insert(0, os.path.abspath('./tutorials'))
# build the templated autosummary files
# autosummary_generate = True
@ -131,7 +131,7 @@ language = "en"
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ["notebooks/colab**", "notebooks/_src/**"]
exclude_patterns = ["tutorials/colab**", "tutorials/_src/**"]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"

View File

@ -55,7 +55,7 @@ Check out our `whirlwind tour <whirlwind_tour>`_ or some of our tutorials mentio
:caption: functorch: Getting Started
install
notebooks/whirlwind_tour.ipynb
tutorials/whirlwind_tour.ipynb
ux_limitations
.. toctree::
@ -70,9 +70,9 @@ Check out our `whirlwind tour <whirlwind_tour>`_ or some of our tutorials mentio
:maxdepth: 1
:caption: functorch Tutorials
notebooks/jacobians_hessians.ipynb
notebooks/ensembling.ipynb
notebooks/per_sample_grads.ipynb
notebooks/neural_tangent_kernels.ipynb
notebooks/aot_autograd_optimizations.ipynb
notebooks/minifier.ipynb
tutorials/jacobians_hessians.ipynb
tutorials/ensembling.ipynb
tutorials/per_sample_grads.ipynb
tutorials/neural_tangent_kernels.ipynb
tutorials/aot_autograd_optimizations.ipynb
tutorials/minifier.ipynb

View File

@ -1 +0,0 @@
../../notebooks/

View File

@ -6,7 +6,7 @@
"source": [
"# AOT Autograd - How to use and optimize?\n",
"\n",
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/master/functorch/notebooks/aot_autograd_optimizations.ipynb\">\n",
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/main/functorch/docs/source/tutorials/aot_autograd_optimizations.ipynb\">\n",
" <img style=\"width: auto\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
"</a>\n",
"\n",

View File

@ -11,7 +11,7 @@
"\n",
"This example illustrates how to vectorize model ensembling using vmap.\n",
"\n",
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/master/functorch/notebooks/ensembling.ipynb\">\n",
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/main/functorch/docs/source/tutorials/ensembling.ipynb\">\n",
" <img style=\"width: auto\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
"</a>\n",
"\n",

View File

@ -5,7 +5,7 @@
"source": [
"# Jacobians, Hessians, hvp, vhp, and more: composing functorch transforms\n",
"\n",
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/master/functorch/notebooks/jacobians_hessians.ipynb\">\n",
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/main/functorch/docs/source/tutorials/jacobians_hessians.ipynb\">\n",
" <img style=\"width: auto\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
"</a>\n",
"\n",

View File

@ -7,7 +7,7 @@
"source": [
"# Neural Tangent Kernels\n",
"\n",
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/master/functorch/notebooks/neural_tangent_kernels.ipynb\">\n",
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/main/functorch/docs/source/tutorials/neural_tangent_kernels.ipynb\">\n",
" <img style=\"width: auto\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
"</a>\n",
"\n",

View File

@ -9,7 +9,7 @@
"source": [
"# Per-sample-gradients\n",
"\n",
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/master/functorch/notebooks/per_sample_grads.ipynb\">\n",
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/main/functorch/docs/source/tutorials/per_sample_grads.ipynb\">\n",
" <img style=\"width: auto\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
"</a>\n",
"\n",

View File

@ -7,7 +7,7 @@
"source": [
"# Whirlwind Tour\n",
"\n",
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/master/functorch/notebooks/whirlwind_tour.ipynb\">\n",
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/main/functorch/docs/source/tutorials/whirlwind_tour.ipynb\">\n",
" <img style=\"width: auto\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
"</a>\n",
"\n",

View File

@ -278,7 +278,7 @@ keep-runtime-typing = true
"PYI021", # docstring-in-stub
"PYI053", # string-or-bytes-too-long
]
"functorch/notebooks/**" = [
"functorch/docs/source/tutorials/**" = [
"F401",
]
"test/export/**" = [