Skip to content

Commit 9ebebd1

Browse files
authored
Merge branch 'main' into update_cpp_tutorial
2 parents 5dfeb59 + 0d0432e commit 9ebebd1

File tree

8 files changed

+19
-160
lines changed

8 files changed

+19
-160
lines changed

.ci/docker/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pandocfilters==1.5.1
1616
markdown==3.8.2
1717

1818
# PyTorch Theme
19-
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@3066b6f62b0da01c52570c928281bca68287933d#egg=pytorch_sphinx_theme2
19+
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@c2e38b37f3c432c610639f06d1d421c6df4c225c#egg=pytorch_sphinx_theme2
2020

2121
# Tutorial dependencies
2222
tqdm==4.66.1

beginner_source/introyt/tensors_deeper_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585

8686

8787
#########################################################################
88-
# The fctory methods all do just what you’d expect - we have a tensor
88+
# The factory methods all do just what you’d expect - we have a tensor
8989
# full of zeros, another full of ones, and another with random values
9090
# between 0 and 1.
9191
#

conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def wrapper(*args, **kwargs):
145145

146146
intersphinx_mapping = {
147147
"torch": ("https://docs.pytorch.org/docs/stable/", None),
148-
"tensordict": ("https://docs.pytorch.github.io/tensordict/stable", None),
148+
"tensordict": ("https://docs.pytorch.org/tensordict/stable", None),
149149
"torchrl": ("https://docs.pytorch.org/rl/stable", None),
150150
"torchaudio": ("https://docs.pytorch.org/audio/stable/", None),
151151
"torchtext": ("https://docs.pytorch.org/text/stable/", None),
@@ -236,6 +236,7 @@ def wrapper(*args, **kwargs):
236236
"navbar_center": "navbar-nav",
237237
"display_version": True,
238238
"pytorch_project": "tutorials",
239+
"canonical_url": "https://docs.pytorch.org/tutorials/",
239240
}
240241

241242
theme_variables = pytorch_sphinx_theme2.get_theme_variables()

intermediate_source/neural_tangent_kernels.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
.. note::
1515
16-
This tutorial requires PyTorch 2.0.0 or later.
16+
This tutorial requires PyTorch 2.6.0 or later.
1717
1818
Setup
1919
-----
@@ -24,7 +24,12 @@
2424
import torch
2525
import torch.nn as nn
2626
from torch.func import functional_call, vmap, vjp, jvp, jacrev
27-
device = 'cuda' if torch.cuda.device_count() > 0 else 'cpu'
27+
28+
if torch.accelerator.is_available() and torch.accelerator.device_count() > 0:
29+
device = torch.accelerator.current_accelerator()
30+
else:
31+
device = torch.device("cpu")
32+
2833

2934
class CNN(nn.Module):
3035
def __init__(self):

intermediate_source/reinforcement_ppo.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
2626
We will cover six crucial components of TorchRL:
2727
28-
* `environments <https://pytorch.org/rl/reference/envs.html>`__
29-
* `transforms <https://pytorch.org/rl/reference/envs.html#transforms>`__
30-
* `models (policy and value function) <https://pytorch.org/rl/reference/modules.html>`__
31-
* `loss modules <https://pytorch.org/rl/reference/objectives.html>`__
32-
* `data collectors <https://pytorch.org/rl/reference/collectors.html>`__
33-
* `replay buffers <https://pytorch.org/rl/reference/data.html#replay-buffers>`__
28+
* `environments <https://docs.pytorch.org/rl/stable/reference/envs.html>`__
29+
* `transforms <https://docs.pytorch.org/rl/stable/reference/envs.html#transforms>`__
30+
* `models (policy and value function) <https://docs.pytorch.org/rl/stable/reference/modules.html>`__
31+
* `loss modules <https://docs.pytorch.org/rl/stable/reference/objectives.html>`__
32+
* `data collectors <https://docs.pytorch.org/rl/stable/reference/collectors.html>`__
33+
* `replay buffers <https://docs.pytorch.org/rl/stable/reference/data.html#replay-buffers>`__
3434
3535
"""
3636

@@ -466,7 +466,7 @@
466466
# Data collector
467467
# --------------
468468
#
469-
# TorchRL provides a set of `DataCollector classes <https://pytorch.org/rl/reference/collectors.html>`__.
469+
# TorchRL provides a set of `DataCollector classes <https://docs.pytorch.org/rl/stable/reference/collectors.html>`__.
470470
# Briefly, these classes execute three operations: reset an environment,
471471
# compute an action given the latest observation, execute a step in the environment,
472472
# and repeat the last two steps until the environment signals a stop (or reaches

recipes_index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@ from our full-length tutorials.
367367
recipes/recipes/timer_quick_start
368368
recipes/torch_compile_backend_ipex
369369
recipes/zero_redundancy_optimizer
370-
recipes/cuda_rpc
371370
recipes/distributed_comm_debug_mode
372371
recipes/torch_export_challenges_solutions
373372
recipes/recipes/benchmark

recipes_source/cuda_rpc.rst

Lines changed: 0 additions & 147 deletions
This file was deleted.

redirects.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"prototype/pt2e_quantizer.html": "https://docs.pytorch.org/ao/main/tutorials_source/pt2e_quantizer.html",
3232
"prototype/quantization_in_pytorch_2_0_export_tutorial.html": "../index.html",
3333
"prototype/torchscript_freezing.html": "../index.html",
34+
"recipes_source/cuda_rpc.rst": "../index.html",
3435
"receipes/fuse.html": "../index.html",
3536
"receipes/quantization.html": "../index.html",
3637
"receipes/receipes/dynamic_quantization.html": "../index.html",

0 commit comments

Comments
 (0)