Skip to content

Commit 92b0a06

Browse files
Merge branch 'main' into delete_flex_njt
2 parents 042293f + c4d9d93 commit 92b0a06

File tree

79 files changed

+2203
-2339
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2203
-2339
lines changed

.ci/docker/requirements.txt

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# --extra-index-url https://download.pytorch.org/whl/cu117/index.html # Use this to run/publish tutorials against the latest binaries during the RC stage. Comment out after the release. Each release verify the correct cuda version.
22
# Refer to ./jenkins/build.sh for tutorial build instructions.
33

4-
54
# Sphinx dependencies
65
sphinx==7.2.6
76
sphinx-gallery==0.19.0
@@ -16,16 +15,15 @@ pypandoc==1.15
1615
pandocfilters==1.5.1
1716
markdown==3.8.2
1817

19-
2018
# PyTorch Theme
21-
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@pytorch_sphinx_theme2#egg=pytorch_sphinx_theme2
19+
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@3066b6f62b0da01c52570c928281bca68287933d#egg=pytorch_sphinx_theme2
2220

2321
# Tutorial dependencies
2422
tqdm==4.66.1
2523
numpy==1.24.4
2624
matplotlib
2725
librosa
28-
torch==2.7
26+
torch==2.8
2927
torchvision
3028
torchdata
3129
networkx
@@ -39,8 +37,8 @@ tensorboard
3937
jinja2==3.1.3
4038
pytorch-lightning
4139
torchx
42-
torchrl==0.7.2
43-
tensordict==0.7.2
40+
torchrl==0.9.2
41+
tensordict==0.9.1
4442
# For ax_multiobjective_nas_tutorial.py
4543
ax-platform>=0.4.0,<0.5.0
4644
nbformat>=5.9.2
@@ -52,12 +50,8 @@ onnxruntime
5250
evaluate
5351
accelerate>=0.20.1
5452

55-
5653
importlib-metadata==6.8.0
5754

58-
# PyTorch Theme
59-
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
60-
6155
ipython
6256

6357
sphinxcontrib.katex

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ advanced
55
pytorch_basics
66
/recipes
77
prototype
8+
/unstable
9+
sg_execution_times.rst
810

911
#data things
1012
_data/

.jenkins/download_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
BEGINNER_DATA_DIR = REPO_BASE_DIR / "beginner_source" / "data"
1313
INTERMEDIATE_DATA_DIR = REPO_BASE_DIR / "intermediate_source" / "data"
1414
ADVANCED_DATA_DIR = REPO_BASE_DIR / "advanced_source" / "data"
15-
PROTOTYPE_DATA_DIR = REPO_BASE_DIR / "prototype_source" / "data"
15+
PROTOTYPE_DATA_DIR = REPO_BASE_DIR / "unstable_source" / "data"
1616
FILES_TO_RUN = os.getenv("FILES_TO_RUN")
1717

1818

@@ -106,7 +106,7 @@ def download_lenet_mnist() -> None:
106106
)
107107

108108
def download_gpu_quantization_torchao() -> None:
109-
# Download SAM model checkpoint for prototype_source/gpu_quantization_torchao_tutorial.py
109+
# Download SAM model checkpoint unstable_source/gpu_quantization_torchao_tutorial.py
110110
download_url_to_file("https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth",
111111
prefix=PROTOTYPE_DATA_DIR,
112112
dst="sam_vit_h_4b8939.pth",

.jenkins/validate_tutorials_built.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,28 @@
1818
"beginner_source/examples_nn/polynomial_module",
1919
"beginner_source/examples_nn/dynamic_net",
2020
"beginner_source/examples_nn/polynomial_optim",
21-
"beginner_source/former_torchies/autograd_tutorial_old",
22-
"beginner_source/former_torchies/tensor_tutorial_old",
2321
"beginner_source/examples_autograd/polynomial_autograd",
2422
"beginner_source/examples_autograd/polynomial_custom_function",
23+
"intermediate_source/dqn_with_rnn_tutorial", #not working on 2.8 release reenable after 3514
2524
"intermediate_source/mnist_train_nas", # used by ax_multiobjective_nas_tutorial.py
2625
"intermediate_source/torch_compile_conv_bn_fuser",
2726
"intermediate_source/_torch_export_nightly_tutorial", # does not work on release
2827
"advanced_source/usb_semisup_learn", # fails with CUDA OOM error, should try on a different worker
29-
"prototype_source/fx_graph_mode_ptq_dynamic",
30-
"prototype_source/vmap_recipe",
31-
"prototype_source/torchscript_freezing",
32-
"prototype_source/nestedtensor",
33-
"prototype_source/gpu_direct_storage", # requires specific filesystem + GPUDirect Storage to be set up
34-
"recipes_source/recipes/saving_and_loading_models_for_inference",
35-
"recipes_source/recipes/saving_multiple_models_in_one_file",
28+
"unstable_source/gpu_direct_storage", # requires specific filesystem + GPUDirect Storage to be set up
3629
"recipes_source/recipes/tensorboard_with_pytorch",
3730
"recipes_source/recipes/what_is_state_dict",
3831
"recipes_source/recipes/profiler_recipe",
39-
"recipes_source/recipes/save_load_across_devices",
4032
"recipes_source/recipes/warmstarting_model_using_parameters_from_a_different_model",
41-
"recipes_source/recipes/dynamic_quantization",
42-
"recipes_source/recipes/saving_and_loading_a_general_checkpoint",
4333
"recipes_source/recipes/benchmark",
4434
"recipes_source/recipes/tuning_guide",
4535
"recipes_source/recipes/zeroing_out_gradients",
4636
"recipes_source/recipes/defining_a_neural_network",
4737
"recipes_source/recipes/timer_quick_start",
4838
"recipes_source/recipes/amp_recipe",
4939
"recipes_source/recipes/Captum_Recipe",
50-
"intermediate_source/text_to_speech_with_torchaudio",
5140
"intermediate_source/tensorboard_profiler_tutorial", # reenable after 2.0 release.
5241
"advanced_source/semi_structured_sparse", # reenable after 3303 is fixed.
42+
"intermediate_source/torchrec_intro_tutorial.py", #failing with 2.8 reenable after 3498
5343
]
5444

5545
def tutorial_source_dirs() -> List[Path]:

.lintrunner.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ exclude_patterns = [
6666
"intermediate_source/tiatoolbox_tutorial.rst",
6767
"intermediate_source/torch_compile_tutorial.py",
6868
"intermediate_source/transformer_building_blocks.py",
69-
"prototype_source/README.md",
70-
"prototype_source/README.txt",
71-
"prototype_source/backend_config_tutorial.rst",
72-
"prototype_source/gpu_direct_storage.py",
73-
"prototype_source/inductor_cpp_wrapper_tutorial.rst",
74-
"prototype_source/inductor_windows.rst",
75-
"prototype_source/maskedtensor_advanced_semantics.py",
76-
"prototype_source/max_autotune_on_CPU_tutorial.rst",
77-
"prototype_source/vmap_recipe.py",
69+
"unstable_source/README.md",
70+
"unstable_source/README.txt",
71+
"unstable_source/backend_config_tutorial.rst",
72+
"unstable_source/gpu_direct_storage.py",
73+
"unstable_source/inductor_cpp_wrapper_tutorial.rst",
74+
"unstable_source/inductor_windows.rst",
75+
"unstable_source/maskedtensor_advanced_semantics.py",
76+
"unstable_source/max_autotune_on_CPU_tutorial.rst",
77+
"unstable_source/vmap_recipe.py",
7878
"recipes_source/README.txt",
7979
"recipes_source/amx.rst",
8080
"recipes_source/compiling_optimizer.rst",
@@ -150,7 +150,7 @@ exclude_patterns = [
150150
"intermediate_source/README.txt",
151151
"intermediate_source/TP_tutorial.rst",
152152
"intermediate_source/inductor_debug_cpu.py",
153-
"prototype_source/README.txt",
153+
"unstable_source/README.txt",
154154
"recipes_source/README.txt",
155155
"recipes_source/recipes/README.txt",
156156
"recipes_source/xeon_run_cpu.rst",

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ There are three types of tutorial content that we host on
7171
reStructuredText files. The build system only converts them into HTML;
7272
the code in them does not run on build. These tutorials are easier to
7373
create and maintain but they do not provide an interactive experience.
74-
An example is the [Dynamic Quantization
75-
tutorial](https://pytorch.org/tutorials/recipes/recipes/dynamic_quantization.html).
74+
7675

7776
* **Recipes** are tutorials that provide bite-sized, actionable
7877
examples of how to use specific features, which differentiates them
@@ -265,7 +264,7 @@ search, you need to include it in `index.rst`, or for recipes, in
265264
1. Open the relevant file
266265
[`index.rst`](https://github.com/pytorch/tutorials/blob/main/index.rst)
267266
or
268-
[`recipes_index.rst`](https://github.com/pytorch/tutorials/blob/main/recipes_source/recipes_index.rst)
267+
[`recipes_index.rst`](https://github.com/pytorch/tutorials/blob/main/recipes_index.rst)
269268
1. Add a _card_ in reStructuredText format similar to the following:
270269

271270
```

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NOTE: Before submitting a new tutorial, read [PyTorch Tutorial Submission Policy
2727
1. Create a Python file. If you want it executed while inserted into documentation, save the file with the suffix `tutorial` so that the file name is `your_tutorial.py`.
2828
2. Put it in one of the `beginner_source`, `intermediate_source`, `advanced_source` directory based on the level of difficulty. If it is a recipe, add it to `recipes_source`. For tutorials demonstrating unstable prototype features, add to the `prototype_source`.
2929
3. For Tutorials (except if it is a prototype feature), include it in the `toctree` directive and create a `customcarditem` in [index.rst](./index.rst).
30-
4. For Tutorials (except if it is a prototype feature), create a thumbnail in the [index.rst file](https://github.com/pytorch/tutorials/blob/main/index.rst) using a command like `.. customcarditem:: beginner/your_tutorial.html`. For Recipes, create a thumbnail in the [recipes_index.rst](https://github.com/pytorch/tutorials/blob/main/recipes_source/recipes_index.rst)
30+
4. For Tutorials (except if it is a prototype feature), create a thumbnail in the [index.rst file](https://github.com/pytorch/tutorials/blob/main/index.rst) using a command like `.. customcarditem:: beginner/your_tutorial.html`. For Recipes, create a thumbnail in the [recipes_index.rst](https://github.com/pytorch/tutorials/blob/main/recipes_index.rst)
3131

3232
If you are starting off with a Jupyter notebook, you can use [this script](https://gist.github.com/chsasank/7218ca16f8d022e02a9c0deb94a310fe) to convert the notebook to Python file. After conversion and addition to the project, please make sure that section headings and other things are in logical order.
3333

226 KB
Loading
40.6 KB
Loading
61.7 KB
Loading

0 commit comments

Comments
 (0)