Skip to content

Commit cf0aca5

Browse files
authored
Merge branch 'main' into angelayi/aoti_fix
2 parents 805a1b2 + d4c1e74 commit cf0aca5

30 files changed

+867
-407
lines changed

.ci/docker/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ tensorboard
2828
jinja2==3.1.3
2929
pytorch-lightning
3030
torchx
31-
torchrl==0.5.0
32-
tensordict==0.5.0
31+
torchrl==0.6.0
32+
tensordict==0.6.0
3333
ax-platform>=0.4.0
3434
nbformat>=5.9.2
3535
datasets

.jenkins/build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ sudo apt-get install -y pandoc
2222
#Install PyTorch Nightly for test.
2323
# Nightly - pip install --pre torch torchvision torchaudio -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html
2424
# Install 2.5 to merge all 2.4 PRs - uncomment to install nightly binaries (update the version as needed).
25-
# pip uninstall -y torch torchvision torchaudio torchtext torchdata
26-
# pip3 install torch==2.5.0 torchvision torchaudio --no-cache-dir --index-url https://download.pytorch.org/whl/test/cu124
25+
sudo pip uninstall -y torch torchvision torchaudio torchtext torchdata
26+
sudo pip3 install torch==2.6.0 torchvision --no-cache-dir --index-url https://download.pytorch.org/whl/test/cu124
27+
sudo pip uninstall -y fbgemm-gpu torchrec
28+
sudo pip3 install fbgemm-gpu==1.1.0 torchrec==1.0.0 --no-cache-dir --index-url https://download.pytorch.org/whl/test/cu124
2729

2830
# Install two language tokenizers for Translation with TorchText tutorial
2931
python -m spacy download en_core_web_sm

.jenkins/validate_tutorials_built.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@
5151
"intermediate_source/flask_rest_api_tutorial",
5252
"intermediate_source/text_to_speech_with_torchaudio",
5353
"intermediate_source/tensorboard_profiler_tutorial", # reenable after 2.0 release.
54-
"intermediate_source/torch_export_tutorial" # reenable after 2940 is fixed.
54+
"intermediate_source/torch_export_tutorial", # reenable after 2940 is fixed.
55+
"advanced_source/pendulum",
56+
"beginner_source/onnx/export_simple_model_to_onnx_tutorial",
57+
"beginner_source/onnx/onnx_registry_tutorial"
5558
]
5659

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

.lycheeignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@ https://pytorch.org/tutorials/beginner/colab/n
1212

1313
# Ignore local host link from intermediate_source/tensorboard_tutorial.rst
1414
http://localhost:6006
15+
16+
# Ignore local host link from recipes_source/deployment_with_flask.rst
17+
http://localhost:5000/predict
18+
19+
# Ignore local host link from advanced_source/cpp_frontend.rst
20+
https://www.uber.com/blog/deep-neuroevolution/

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,8 @@ described in the preceding sections:
218218
- [NLP From Scratch: Generating Names with a Character-Level RNN
219219
Tutorial](https://pytorch.org/tutorials/intermediate/char_rnn_generation_tutorial.html)
220220

221-
If you are creating a recipe, we recommend that you use [this
222-
template](https://github.com/pytorch/tutorials/blob/tutorials_refresh/recipes_source/recipes/example_recipe.py)
223-
as a guide.
221+
If you are creating a recipe, [this is a good
222+
example.](https://github.com/pytorch/tutorials/blob/main/recipes_source/recipes/what_is_state_dict.py)
224223

225224

226225
# Submission Process #

advanced_source/cpp_autograd.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,9 @@ Out:
255255
[ CPUFloatType{3,4} ]
256256
257257
Please see the documentation for ``torch::autograd::backward``
258-
(`link <https://pytorch.org/cppdocs/api/function_namespacetorch_1_1autograd_1afa9b5d4329085df4b6b3d4b4be48914b.html>`_)
258+
(`link <https://pytorch.org/cppdocs/api/function_namespacetorch_1_1autograd_1a1403bf65b1f4f8c8506a9e6e5312d030.html>`_)
259259
and ``torch::autograd::grad``
260-
(`link <https://pytorch.org/cppdocs/api/function_namespacetorch_1_1autograd_1a1e03c42b14b40c306f9eb947ef842d9c.html>`_)
260+
(`link <https://pytorch.org/cppdocs/api/function_namespacetorch_1_1autograd_1ab9fa15dc09a8891c26525fb61d33401a.html>`_)
261261
for more information on how to use them.
262262

263263
Using custom autograd function in C++
@@ -394,9 +394,9 @@ C++ using the following table:
394394
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
395395
| Python | C++ |
396396
+================================+========================================================================================================================================================================+
397-
| ``torch.autograd.backward`` | ``torch::autograd::backward`` (`link <https://pytorch.org/cppdocs/api/function_namespacetorch_1_1autograd_1afa9b5d4329085df4b6b3d4b4be48914b.html>`_) |
397+
| ``torch.autograd.backward`` | ``torch::autograd::backward`` (`link <https://pytorch.org/cppdocs/api/function_namespacetorch_1_1autograd_1a1403bf65b1f4f8c8506a9e6e5312d030.html>`_) |
398398
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
399-
| ``torch.autograd.grad`` | ``torch::autograd::grad`` (`link <https://pytorch.org/cppdocs/api/function_namespacetorch_1_1autograd_1a1e03c42b14b40c306f9eb947ef842d9c.html>`_) |
399+
| ``torch.autograd.grad`` | ``torch::autograd::grad`` (`link <https://pytorch.org/cppdocs/api/function_namespacetorch_1_1autograd_1ab9fa15dc09a8891c26525fb61d33401a.html>`_) |
400400
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
401401
| ``torch.Tensor.detach`` | ``torch::Tensor::detach`` (`link <https://pytorch.org/cppdocs/api/classat_1_1_tensor.html#_CPPv4NK2at6Tensor6detachEv>`_) |
402402
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

advanced_source/cpp_custom_ops.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ Custom C++ and CUDA Operators
1919
* PyTorch 2.4 or later
2020
* Basic understanding of C++ and CUDA programming
2121

22+
.. note::
23+
24+
This tutorial will also work on AMD ROCm with no additional modifications.
25+
2226
PyTorch offers a large library of operators that work on Tensors (e.g. torch.add, torch.sum, etc).
2327
However, you may wish to bring a new custom operator to PyTorch. This tutorial demonstrates the
2428
blessed path to authoring a custom operator written in C++/CUDA.

advanced_source/cpp_frontend.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ the right tool for the job. Examples for such environments include:
5757
Multiprocessing is an alternative, but not as scalable and has significant
5858
shortcomings. C++ has no such constraints and threads are easy to use and
5959
create. Models requiring heavy parallelization, like those used in `Deep
60-
Neuroevolution <https://eng.uber.com/deep-neuroevolution/>`_, can benefit from
60+
Neuroevolution <https://www.uber.com/blog/deep-neuroevolution/>`_, can benefit from
6161
this.
6262
- **Existing C++ Codebases**: You may be the owner of an existing C++
6363
application doing anything from serving web pages in a backend server to
@@ -662,7 +662,7 @@ Defining the DCGAN Modules
662662
We now have the necessary background and introduction to define the modules for
663663
the machine learning task we want to solve in this post. To recap: our task is
664664
to generate images of digits from the `MNIST dataset
665-
<http://yann.lecun.com/exdb/mnist/>`_. We want to use a `generative adversarial
665+
<https://huggingface.co/datasets/ylecun/mnist>`_. We want to use a `generative adversarial
666666
network (GAN)
667667
<https://papers.nips.cc/paper/5423-generative-adversarial-nets.pdf>`_ to solve
668668
this task. In particular, we'll use a `DCGAN architecture

advanced_source/custom_ops_landing_page.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ You may wish to author a custom operator from Python (as opposed to C++) if:
2323
respect to ``torch.compile`` and ``torch.export``.
2424
- you have some Python bindings to C++/CUDA kernels and want those to compose with PyTorch
2525
subsystems (like ``torch.compile`` or ``torch.autograd``)
26+
- you are using Python (and not a C++-only environment like AOTInductor).
2627

2728
Integrating custom C++ and/or CUDA code with PyTorch
2829
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

advanced_source/pendulum.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
3434
In the process, we will touch three crucial components of TorchRL:
3535
36-
* `environments <https://pytorch.org/rl/reference/envs.html>`__
37-
* `transforms <https://pytorch.org/rl/reference/envs.html#transforms>`__
38-
* `models (policy and value function) <https://pytorch.org/rl/reference/modules.html>`__
36+
* `environments <https://pytorch.org/rl/stable/reference/envs.html>`__
37+
* `transforms <https://pytorch.org/rl/stable/reference/envs.html#transforms>`__
38+
* `models (policy and value function) <https://pytorch.org/rl/stable/reference/modules.html>`__
3939
4040
"""
4141

@@ -384,7 +384,7 @@ def _reset(self, tensordict):
384384
# convenient shortcuts to the content of the output and input spec containers.
385385
#
386386
# TorchRL offers multiple :class:`~torchrl.data.TensorSpec`
387-
# `subclasses <https://pytorch.org/rl/reference/data.html#tensorspec>`_ to
387+
# `subclasses <https://pytorch.org/rl/stable/reference/data.html#tensorspec>`_ to
388388
# encode the environment's input and output characteristics.
389389
#
390390
# Specs shape

0 commit comments

Comments
 (0)