Skip to content

Commit e529507

Browse files
zklausdsashidh
authored andcommitted
Make functorch notebook symlinks PEP 517 valid (pytorch#157813)
Pull Request resolved: pytorch#157813 Approved by: https://github.com/zou3519, https://github.com/atalman
1 parent 8176959 commit e529507

17 files changed

Lines changed: 19 additions & 21 deletions

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ exclude =
7373
./docs/src,
7474
./functorch/docs,
7575
./functorch/examples,
76-
./functorch/notebooks,
76+
./functorch/docs/source/tutorials,
7777
./scripts,
7878
./test/generated_type_hints_smoketest.py,
7979
./third_party,

.lintrunner.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exclude_patterns = [
1313
'**/fb/**',
1414
'functorch/docs/**',
1515
'functorch/examples/**',
16-
'functorch/notebooks/**',
16+
'functorch/docs/source/tutorials/**',
1717
'torch/_inductor/fx_passes/serialized_patterns/**',
1818
'torch/_inductor/autoheuristic/artifacts/**',
1919
'scripts/**',
@@ -1568,7 +1568,6 @@ include_patterns = [
15681568
exclude_patterns = [
15691569
'caffe2/**',
15701570
'functorch/docs/**',
1571-
'functorch/notebooks/**',
15721571
'torch/_inductor/fx_passes/serialized_patterns/**',
15731572
'torch/_inductor/autoheuristic/artifacts/**',
15741573
'test/dynamo/cpython/**',

functorch/COMPILE_README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ aot_function(f, ts_compiler, ts_compiler)(torch.randn(3, requires_grad=True))
7272
* Min-cut [recomputation](https://dev-discuss.pytorch.org/t/min-cut-optimal-recomputation-i-e-activation-checkpointing-with-aotautograd/467) with AOT Autograd.
7373

7474
## Tutorials
75-
You can use this [tutorial](https://pytorch.org/functorch/nightly/notebooks/aot_autograd_optimizations.html) to play with AOT Autograd.
75+
You can use this [tutorial](https://pytorch.org/functorch/nightly/tutorials/aot_autograd_optimizations.html) to play with AOT Autograd.

functorch/docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"myst_nb",
5151
]
5252

53-
# sys.path.insert(0, os.path.abspath('./notebooks'))
53+
# sys.path.insert(0, os.path.abspath('./tutorials'))
5454

5555
# build the templated autosummary files
5656
# autosummary_generate = True
@@ -131,7 +131,7 @@
131131
# List of patterns, relative to source directory, that match files and
132132
# directories to ignore when looking for source files.
133133
# This patterns also effect to html_static_path and html_extra_path
134-
exclude_patterns = ["notebooks/colab**", "notebooks/_src/**"]
134+
exclude_patterns = ["tutorials/colab**", "tutorials/_src/**"]
135135

136136
# The name of the Pygments (syntax highlighting) style to use.
137137
pygments_style = "sphinx"

functorch/docs/source/index.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Check out our `whirlwind tour <whirlwind_tour>`_ or some of our tutorials mentio
5555
:caption: functorch: Getting Started
5656

5757
install
58-
notebooks/whirlwind_tour.ipynb
58+
tutorials/whirlwind_tour.ipynb
5959
ux_limitations
6060

6161
.. toctree::
@@ -70,9 +70,9 @@ Check out our `whirlwind tour <whirlwind_tour>`_ or some of our tutorials mentio
7070
:maxdepth: 1
7171
:caption: functorch Tutorials
7272

73-
notebooks/jacobians_hessians.ipynb
74-
notebooks/ensembling.ipynb
75-
notebooks/per_sample_grads.ipynb
76-
notebooks/neural_tangent_kernels.ipynb
77-
notebooks/aot_autograd_optimizations.ipynb
78-
notebooks/minifier.ipynb
73+
tutorials/jacobians_hessians.ipynb
74+
tutorials/ensembling.ipynb
75+
tutorials/per_sample_grads.ipynb
76+
tutorials/neural_tangent_kernels.ipynb
77+
tutorials/aot_autograd_optimizations.ipynb
78+
tutorials/minifier.ipynb

functorch/docs/source/notebooks

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

functorch/notebooks/_src/plot_jacobians_and_hessians.py renamed to functorch/docs/source/tutorials/_src/plot_jacobians_and_hessians.py

File renamed without changes.

functorch/notebooks/_src/plot_per_sample_gradients.py renamed to functorch/docs/source/tutorials/_src/plot_per_sample_gradients.py

File renamed without changes.

functorch/notebooks/aot_autograd_optimizations.ipynb renamed to functorch/docs/source/tutorials/aot_autograd_optimizations.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": [
77
"# AOT Autograd - How to use and optimize?\n",
88
"\n",
9-
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/master/functorch/notebooks/aot_autograd_optimizations.ipynb\">\n",
9+
"<a href=\"https://colab.research.google.com/github/pytorch/pytorch/blob/main/functorch/docs/source/tutorials/aot_autograd_optimizations.ipynb\">\n",
1010
" <img style=\"width: auto\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
1111
"</a>\n",
1212
"\n",

0 commit comments

Comments
 (0)