Skip to content

Commit 48447d9

Browse files
authored
Merge branch 'main' into 2.4-RC-TEST
2 parents 10cc5af + f2b8a1b commit 48447d9

File tree

3 files changed

+47
-4
lines changed

3 files changed

+47
-4
lines changed
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Language Modeling with ``nn.Transformer`` and torchtext
2-
===========================================================
2+
=======================================================
33

44
The content is deprecated.
55

66
.. raw:: html
7-
<meta http-equiv="refresh" content="0; url=https://pytorch.org/tutorials/">
7+
8+
<meta http-equiv="Refresh" content="1; url='https://pytorch.org/tutorials/'" />

docathon-leaderboard.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
# 🎉 Docathon H1 2024 Leaderboard 🎉
2+
3+
This is the list of the docathon contributors that have participated and contributed to the PyTorch H1 2024 docathon.
4+
A big shout out to everyone who have participated! We have awarded points for each merged PR.
5+
For the **easy** label, we have awarded 2 points. For the **medium** label, we have awarded 5 points.
6+
For the **advanced** label, we have awarded 10 points. In some cases, we have awarded credit for the PRs that
7+
were not merged or issues that have been closed without a merged PR.
8+
9+
| Author | Points | PR |
10+
|--- | --- | ---|
11+
| ahoblitz | 34 | https://github.com/pytorch/pytorch/pull/128566, https://github.com/pytorch/pytorch/pull/128408, https://github.com/pytorch/pytorch/pull/128171, https://github.com/pytorch/pytorch/pull/128083, https://github.com/pytorch/pytorch/pull/128082, https://github.com/pytorch/pytorch/pull/127983, https://github.com/pytorch/xla/pull/7214 |
12+
| afrittoli | 25 | https://github.com/pytorch/pytorch/pull/128139, https://github.com/pytorch/pytorch/pull/128133, https://github.com/pytorch/pytorch/pull/128132, https://github.com/pytorch/pytorch/pull/128129, https://github.com/pytorch/pytorch/pull/128127 |
13+
| kiszk | 20 | https://github.com/pytorch/pytorch/pull/128337, https://github.com/pytorch/pytorch/pull/128123, https://github.com/pytorch/pytorch/pull/128022, https://github.com/pytorch/pytorch/pull/128312 |
14+
| loganthomas | 19 | https://github.com/pytorch/pytorch/pull/128676, https://github.com/pytorch/pytorch/pull/128192, https://github.com/pytorch/pytorch/pull/128189, https://github.com/pytorch/tutorials/pull/2922, https://github.com/pytorch/tutorials/pull/2910, https://github.com/pytorch/xla/pull/7195 |
15+
| ignaciobartol | 17 | https://github.com/pytorch/pytorch/pull/128741, https://github.com/pytorch/pytorch/pull/128135, https://github.com/pytorch/pytorch/pull/127938, https://github.com/pytorch/tutorials/pull/2936 |
16+
| arunppsg | 17 | https://github.com/pytorch/pytorch/pull/128391, https://github.com/pytorch/pytorch/pull/128021, https://github.com/pytorch/pytorch/pull/128018, https://github.com/pytorch-labs/torchfix/pull/59 |
17+
| alperenunlu | 17 | https://github.com/pytorch/tutorials/pull/2934, https://github.com/pytorch/tutorials/pull/2909, https://github.com/pytorch/pytorch/pull/104043 |
18+
| anandptl84 | 10 | https://github.com/pytorch/pytorch/pull/128196, https://github.com/pytorch/pytorch/pull/128098 |
19+
| GdoongMathew | 10 | https://github.com/pytorch/pytorch/pull/128136, https://github.com/pytorch/pytorch/pull/128051 |
20+
| ZhaoqiongZ | 10 | https://github.com/pytorch/pytorch/pull/127872 |
21+
| ZailiWang | 10 | https://github.com/pytorch/tutorials/pull/2931 |
22+
| jingxu10 | 8 | https://github.com/pytorch/pytorch/pull/127280, https://github.com/pytorch/pytorch/pull/127279, https://github.com/pytorch/pytorch/pull/127278, https://github.com/pytorch/tutorials/pull/2919 |
23+
| sitamgithub-MSIT | 7 | https://github.com/pytorch/tutorials/pull/2900, https://github.com/pytorch/xla/pull/7208 |
24+
| spzala | 5 | https://github.com/pytorch/pytorch/pull/128679, https://github.com/pytorch/pytorch/pull/128657 |
25+
| TharinduRusira | 5 | https://github.com/pytorch/pytorch/pull/128197 |
26+
| zabboud | 5 | https://github.com/pytorch/pytorch/pull/128055 |
27+
| orion160 | 5 | https://github.com/pytorch/tutorials/pull/2912 |
28+
| Ricktho1 | 5 | https://github.com/pytorch/xla/pull/7273 |
29+
| IvanLauLinTiong | 4 | https://github.com/pytorch/pytorch/pull/128526, https://github.com/pytorch/tutorials/pull/2849 |
30+
| sshkhr | 2 | https://github.com/pytorch/pytorch/pull/128155 |
31+
| rk7697 | 2 | https://github.com/pytorch/pytorch/pull/127993 |
32+
| hippocookie | 2 | https://github.com/pytorch/tutorials/pull/2937 |
33+
| diningeachox | 2 | https://github.com/pytorch/tutorials/pull/2935 |
34+
| akhil-maker | 2 | https://github.com/pytorch/tutorials/pull/2899 |
35+
| saurabhkthakur | 2 | https://github.com/pytorch/tutorials/pull/2896 |
36+
137
# 🎉 Docathon H2 2023 Leaderboard 🎉
238

339
This is the list of the docathon contributors that have participated and contributed to the H2 2023 PyTorch docathon.

intermediate_source/reinforcement_q_learning.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
This tutorial shows how to use PyTorch to train a Deep Q Learning (DQN) agent
1010
on the CartPole-v1 task from `Gymnasium <https://gymnasium.farama.org>`__.
1111
12+
You might find it helpful to read the original `Deep Q Learning (DQN) <https://arxiv.org/abs/1312.5602>`__ paper
13+
1214
**Task**
1315
1416
The agent has to decide between two actions - moving the cart left or
@@ -83,7 +85,11 @@
8385
plt.ion()
8486

8587
# if GPU is to be used
86-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
88+
device = torch.device(
89+
"cuda" if torch.cuda.is_available() else
90+
"mps" if torch.backends.mps.is_available() else
91+
"cpu"
92+
)
8793

8894

8995
######################################################################
@@ -397,7 +403,7 @@ def optimize_model():
397403
# can produce better results if convergence is not observed.
398404
#
399405

400-
if torch.cuda.is_available():
406+
if torch.cuda.is_available() or torch.backends.mps.is_available():
401407
num_episodes = 600
402408
else:
403409
num_episodes = 50

0 commit comments

Comments
 (0)