Skip to content

Commit bc18467

Browse files
authored
Merge branch 'main' into update_seq2seq_tutorial
2 parents a08a9d5 + 6e96f1a commit bc18467

File tree

77 files changed

+2122
-2121
lines changed

Some content is hidden

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

77 files changed

+2122
-2121
lines changed

.ci/docker/requirements.txt

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@ pypandoc==1.15
1515
pandocfilters==1.5.1
1616
markdown==3.8.2
1717

18-
1918
# PyTorch Theme
20-
-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@67aa61448e33cae9a345e012be355f8030d3c4f5#egg=pytorch_sphinx_theme2
2120

2221
# Tutorial dependencies
2322
tqdm==4.66.1
2423
numpy==1.24.4
2524
matplotlib
2625
librosa
27-
torch==2.7
26+
torch==2.8
2827
torchvision
2928
torchdata
3029
networkx
@@ -38,8 +37,8 @@ tensorboard
3837
jinja2==3.1.3
3938
pytorch-lightning
4039
torchx
41-
torchrl==0.7.2
42-
tensordict==0.7.2
40+
torchrl==0.9.2
41+
tensordict==0.9.1
4342
# For ax_multiobjective_nas_tutorial.py
4443
ax-platform>=0.4.0,<0.5.0
4544
nbformat>=5.9.2
@@ -51,12 +50,8 @@ onnxruntime
5150
evaluate
5251
accelerate>=0.20.1
5352

54-
5553
importlib-metadata==6.8.0
5654

57-
# PyTorch Theme
58-
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
59-
6055
ipython
6156

6257
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)