Skip to content

Commit

Permalink
auto-generating sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pytorchbot committed Oct 17, 2024
1 parent 5f7ee04 commit 3bc8731
Show file tree
Hide file tree
Showing 73 changed files with 760 additions and 756 deletions.
Binary file modified main/_downloads/04340de0748216c2f40fec722b0c537a/coding_ppo.zip
Binary file not shown.
Binary file modified main/_downloads/081100bf3a52dc1a4dc24370cc84af82/coding_ddpg.zip
Binary file not shown.
Binary file modified main/_downloads/124213c5eea0ba072f91efb7f4ed6dd9/rb_tutorial.zip
Binary file not shown.
Binary file modified main/_downloads/29e38ada65547ef361ed2ee56525e971/coding_dqn.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified main/_downloads/53d45db6c317a5dacd743dd31c55d6e3/multi_task.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified main/_downloads/cf5ed21c138297680764e29dffa8a8af/pendulum.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified main/_images/sphx_glr_coding_ddpg_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_coding_ddpg_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_coding_ppo_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_coding_ppo_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_dqn_with_rnn_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_dqn_with_rnn_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_rb_tutorial_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_rb_tutorial_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_rb_tutorial_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_torchrl_envs_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_torchrl_envs_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions main/_modules/torchrl/objectives/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -810,11 +810,18 @@ <h1>Source code for torchrl.objectives.utils</h1><div class="highlight"><pre>

<span class="k">def</span> <span class="fm">__enter__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mode</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">network</span><span class="o">.</span><span class="n">requires_grad_</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
<span class="k">if</span> <span class="n">is_dynamo_compiling</span><span class="p">():</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_params</span> <span class="o">=</span> <span class="n">TensorDict</span><span class="o">.</span><span class="n">from_module</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">network</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_params</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">to_module</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">network</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">network</span><span class="o">.</span><span class="n">requires_grad_</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>

<span class="k">def</span> <span class="fm">__exit__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc_type</span><span class="p">,</span> <span class="n">exc_val</span><span class="p">,</span> <span class="n">exc_tb</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mode</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">network</span><span class="o">.</span><span class="n">requires_grad_</span><span class="p">()</span></div>
<span class="k">if</span> <span class="n">is_dynamo_compiling</span><span class="p">():</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_params</span><span class="o">.</span><span class="n">to_module</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">network</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">network</span><span class="o">.</span><span class="n">requires_grad_</span><span class="p">()</span></div>


<div class="viewcode-block" id="hold_out_params"><a class="viewcode-back" href="../../../reference/generated/torchrl.objectives.hold_out_params.html#torchrl.objectives.hold_out_params">[docs]</a><span class="k">class</span> <span class="nc">hold_out_params</span><span class="p">(</span><span class="n">_context_manager</span><span class="p">):</span>
Expand Down
74 changes: 37 additions & 37 deletions main/_sources/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Computation times
=================
**27:50.593** total execution time for 18 files **from all galleries**:
**27:35.002** total execution time for 18 files **from all galleries**:

.. container::

Expand All @@ -33,56 +33,56 @@ Computation times
- Time
- Mem (MB)
* - :ref:`sphx_glr_tutorials_torchrl_demo.py` (``reference/generated/tutorials/torchrl_demo.py``)
- 03:44.258
- 350.1
- 03:43.142
- 328.6
* - :ref:`sphx_glr_tutorials_torchrl_envs.py` (``reference/generated/tutorials/torchrl_envs.py``)
- 03:28.778
- 4750.9
- 03:27.697
- 3191.4
* - :ref:`sphx_glr_tutorials_dqn_with_rnn.py` (``reference/generated/tutorials/dqn_with_rnn.py``)
- 03:09.560
- 2201.1
- 03:06.208
- 2219.5
* - :ref:`sphx_glr_tutorials_rb_tutorial.py` (``reference/generated/tutorials/rb_tutorial.py``)
- 02:56.498
- 539.2
- 02:56.053
- 528.8
* - :ref:`sphx_glr_tutorials_coding_dqn.py` (``reference/generated/tutorials/coding_dqn.py``)
- 02:40.706
- 1101.4
- 02:38.515
- 1361.2
* - :ref:`sphx_glr_tutorials_coding_ddpg.py` (``reference/generated/tutorials/coding_ddpg.py``)
- 01:53.236
- 331.2
- 01:52.093
- 332.4
* - :ref:`sphx_glr_tutorials_multiagent_ppo.py` (``reference/generated/tutorials/multiagent_ppo.py``)
- 01:52.901
- 320.9
- 01:50.887
- 322.9
* - :ref:`sphx_glr_tutorials_multiagent_competitive_ddpg.py` (``reference/generated/tutorials/multiagent_competitive_ddpg.py``)
- 01:31.871
- 322.4
- 01:30.707
- 323.6
* - :ref:`sphx_glr_tutorials_coding_ppo.py` (``reference/generated/tutorials/coding_ppo.py``)
- 01:26.437
- 319.9
- 01:25.860
- 321.0
* - :ref:`sphx_glr_tutorials_pretrained_models.py` (``reference/generated/tutorials/pretrained_models.py``)
- 00:55.856
- 4235.3
- 00:54.184
- 2642.4
* - :ref:`sphx_glr_tutorials_multi_task.py` (``reference/generated/tutorials/multi_task.py``)
- 00:51.256
- 320.6
- 00:51.038
- 322.4
* - :ref:`sphx_glr_tutorials_getting-started-1.py` (``reference/generated/tutorials/getting-started-1.py``)
- 00:46.472
- 319.1
- 00:46.351
- 320.2
* - :ref:`sphx_glr_tutorials_getting-started-0.py` (``reference/generated/tutorials/getting-started-0.py``)
- 00:46.344
- 319.1
- 00:46.183
- 320.2
* - :ref:`sphx_glr_tutorials_getting-started-2.py` (``reference/generated/tutorials/getting-started-2.py``)
- 00:26.881
- 322.3
- 00:26.768
- 320.2
* - :ref:`sphx_glr_tutorials_getting-started-5.py` (``reference/generated/tutorials/getting-started-5.py``)
- 00:22.901
- 323.8
- 00:22.841
- 324.0
* - :ref:`sphx_glr_tutorials_getting-started-3.py` (``reference/generated/tutorials/getting-started-3.py``)
- 00:22.019
- 320.7
- 00:21.930
- 322.4
* - :ref:`sphx_glr_tutorials_pendulum.py` (``reference/generated/tutorials/pendulum.py``)
- 00:19.899
- 5083.2
- 00:19.866
- 3635.4
* - :ref:`sphx_glr_tutorials_getting-started-4.py` (``reference/generated/tutorials/getting-started-4.py``)
- 00:14.722
- 350.7
- 00:14.680
- 351.6
6 changes: 3 additions & 3 deletions main/_sources/tutorials/coding_ddpg.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@ modules we need.

.. code-block:: none
0%| | 0/10000 [00:00<?, ?it/s] 8%|▊ | 800/10000 [00:00<00:03, 2533.63it/s] 16%|█▌ | 1600/10000 [00:01<00:10, 827.75it/s] 24%|██▍ | 2400/10000 [00:02<00:06, 1184.15it/s] 32%|███▏ | 3200/10000 [00:02<00:04, 1482.38it/s] 40%|████ | 4000/10000 [00:02<00:03, 1727.05it/s] 48%|████▊ | 4800/10000 [00:03<00:02, 1932.28it/s] 56%|█████▌ | 5600/10000 [00:03<00:02, 2091.49it/s] reward: -2.23 (r0 = -1.88), reward eval: reward: 0.00, reward normalized=-1.85/5.95, grad norm= 115.03, loss_value= 223.69, loss_actor= 14.65, target value: -12.77: 56%|█████▌ | 5600/10000 [00:05<00:02, 2091.49it/s] reward: -2.23 (r0 = -1.88), reward eval: reward: 0.00, reward normalized=-1.85/5.95, grad norm= 115.03, loss_value= 223.69, loss_actor= 14.65, target value: -12.77: 64%|██████▍ | 6400/10000 [00:05<00:04, 837.12it/s] reward: -2.76 (r0 = -1.88), reward eval: reward: 0.00, reward normalized=-2.45/5.53, grad norm= 49.43, loss_value= 213.72, loss_actor= 15.69, target value: -16.02: 64%|██████▍ | 6400/10000 [00:07<00:04, 837.12it/s] reward: -2.76 (r0 = -1.88), reward eval: reward: 0.00, reward normalized=-2.45/5.53, grad norm= 49.43, loss_value= 213.72, loss_actor= 15.69, target value: -16.02: 72%|███████▏ | 7200/10000 [00:07<00:04, 595.56it/s] reward: -4.17 (r0 = -1.88), reward eval: reward: 0.00, reward normalized=-2.85/5.99, grad norm= 60.16, loss_value= 295.90, loss_actor= 18.57, target value: -19.15: 72%|███████▏ | 7200/10000 [00:09<00:04, 595.56it/s] reward: -4.17 (r0 = -1.88), reward eval: reward: 0.00, reward normalized=-2.85/5.99, grad norm= 60.16, loss_value= 295.90, loss_actor= 18.57, target value: -19.15: 80%|████████ | 8000/10000 [00:09<00:04, 495.01it/s] reward: -3.54 (r0 = -1.88), reward eval: reward: 0.00, reward normalized=-2.78/5.50, grad norm= 93.13, loss_value= 222.20, loss_actor= 17.51, target value: -19.17: 80%|████████ | 8000/10000 [00:11<00:04, 495.01it/s] reward: -3.54 (r0 = -1.88), reward eval: reward: 0.00, reward normalized=-2.78/5.50, grad norm= 93.13, loss_value= 222.20, loss_actor= 17.51, target value: -19.17: 88%|████████▊ | 8800/10000 [00:12<00:02, 447.78it/s] reward: -3.94 (r0 = -1.88), reward eval: reward: -5.05, reward normalized=-3.18/5.21, grad norm= 73.80, loss_value= 216.62, loss_actor= 21.77, target value: -23.01: 88%|████████▊ | 8800/10000 [00:14<00:02, 447.78it/s] reward: -3.94 (r0 = -1.88), reward eval: reward: -5.05, reward normalized=-3.18/5.21, grad norm= 73.80, loss_value= 216.62, loss_actor= 21.77, target value: -23.01: 96%|█████████▌| 9600/10000 [00:15<00:01, 356.23it/s] reward: -1.04 (r0 = -1.88), reward eval: reward: -5.05, reward normalized=-3.08/5.53, grad norm= 191.09, loss_value= 228.22, loss_actor= 18.82, target value: -21.64: 96%|█████████▌| 9600/10000 [00:17<00:01, 356.23it/s] reward: -1.04 (r0 = -1.88), reward eval: reward: -5.05, reward normalized=-3.08/5.53, grad norm= 191.09, loss_value= 228.22, loss_actor= 18.82, target value: -21.64: : 10400it [00:18, 327.83it/s] reward: -4.56 (r0 = -1.88), reward eval: reward: -5.05, reward normalized=-3.14/5.20, grad norm= 203.16, loss_value= 257.88, loss_actor= 20.11, target value: -22.75: : 10400it [00:20, 327.83it/s]
0%| | 0/10000 [00:00<?, ?it/s] 8%|▊ | 800/10000 [00:00<00:03, 2826.97it/s] 16%|█▌ | 1600/10000 [00:01<00:09, 876.90it/s] 24%|██▍ | 2400/10000 [00:01<00:06, 1263.22it/s] 32%|███▏ | 3200/10000 [00:02<00:04, 1597.19it/s] 40%|████ | 4000/10000 [00:02<00:03, 1865.86it/s] 48%|████▊ | 4800/10000 [00:02<00:02, 2075.87it/s] 56%|█████▌ | 5600/10000 [00:03<00:01, 2232.59it/s] reward: -2.07 (r0 = -2.11), reward eval: reward: -0.01, reward normalized=-2.73/6.82, grad norm= 357.93, loss_value= 599.35, loss_actor= 13.16, target value: -17.71: 56%|█████▌ | 5600/10000 [00:04<00:01, 2232.59it/s] reward: -2.07 (r0 = -2.11), reward eval: reward: -0.01, reward normalized=-2.73/6.82, grad norm= 357.93, loss_value= 599.35, loss_actor= 13.16, target value: -17.71: 64%|██████▍ | 6400/10000 [00:05<00:04, 873.31it/s] reward: -1.95 (r0 = -2.11), reward eval: reward: -0.01, reward normalized=-2.58/5.85, grad norm= 157.59, loss_value= 272.08, loss_actor= 12.85, target value: -16.15: 64%|██████▍ | 6400/10000 [00:06<00:04, 873.31it/s] reward: -1.95 (r0 = -2.11), reward eval: reward: -0.01, reward normalized=-2.58/5.85, grad norm= 157.59, loss_value= 272.08, loss_actor= 12.85, target value: -16.15: 72%|███████▏ | 7200/10000 [00:07<00:04, 612.34it/s] reward: -4.90 (r0 = -2.11), reward eval: reward: -0.01, reward normalized=-3.03/6.39, grad norm= 133.85, loss_value= 380.05, loss_actor= 18.30, target value: -20.30: 72%|███████▏ | 7200/10000 [00:09<00:04, 612.34it/s] reward: -4.90 (r0 = -2.11), reward eval: reward: -0.01, reward normalized=-3.03/6.39, grad norm= 133.85, loss_value= 380.05, loss_actor= 18.30, target value: -20.30: 80%|████████ | 8000/10000 [00:09<00:03, 513.24it/s] reward: -4.33 (r0 = -2.11), reward eval: reward: -0.01, reward normalized=-3.11/5.59, grad norm= 95.87, loss_value= 247.86, loss_actor= 19.65, target value: -20.67: 80%|████████ | 8000/10000 [00:11<00:03, 513.24it/s] reward: -4.33 (r0 = -2.11), reward eval: reward: -0.01, reward normalized=-3.11/5.59, grad norm= 95.87, loss_value= 247.86, loss_actor= 19.65, target value: -20.67: 88%|████████▊ | 8800/10000 [00:11<00:02, 464.24it/s] reward: -5.32 (r0 = -2.11), reward eval: reward: -5.97, reward normalized=-2.78/4.76, grad norm= 127.61, loss_value= 137.52, loss_actor= 22.26, target value: -20.93: 88%|████████▊ | 8800/10000 [00:14<00:02, 464.24it/s] reward: -5.32 (r0 = -2.11), reward eval: reward: -5.97, reward normalized=-2.78/4.76, grad norm= 127.61, loss_value= 137.52, loss_actor= 22.26, target value: -20.93: 96%|█████████▌| 9600/10000 [00:14<00:01, 369.08it/s] reward: -5.01 (r0 = -2.11), reward eval: reward: -5.97, reward normalized=-3.93/4.97, grad norm= 213.26, loss_value= 254.96, loss_actor= 24.40, target value: -26.34: 96%|█████████▌| 9600/10000 [00:16<00:01, 369.08it/s] reward: -5.01 (r0 = -2.11), reward eval: reward: -5.97, reward normalized=-3.93/4.97, grad norm= 213.26, loss_value= 254.96, loss_actor= 24.40, target value: -26.34: : 10400it [00:17, 339.95it/s] reward: -4.92 (r0 = -2.11), reward eval: reward: -5.97, reward normalized=-3.35/4.84, grad norm= 116.39, loss_value= 227.09, loss_actor= 22.01, target value: -23.85: : 10400it [00:19, 339.95it/s]
Expand Down Expand Up @@ -1704,9 +1704,9 @@ To iterate further on this loss module we might consider:

.. rst-class:: sphx-glr-timing

**Total running time of the script:** (1 minutes 53.236 seconds)
**Total running time of the script:** (1 minutes 52.093 seconds)

**Estimated memory usage:** 331 MB
**Estimated memory usage:** 332 MB


.. _sphx_glr_download_tutorials_coding_ddpg.py:
Expand Down
70 changes: 35 additions & 35 deletions main/_sources/tutorials/coding_dqn.rst.txt

Large diffs are not rendered by default.

Loading

0 comments on commit 3bc8731

Please sign in to comment.