Skip to content

Commit 2e946ea

Browse files
committed
try again on fixing multiproc spawn issue, couldnt repro locally
1 parent b4d74d5 commit 2e946ea

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

intermediate_source/coding_ddpg.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# - how to evaluate your model.
4040
#
4141
# Prerequisites
42-
# ~~~~~~~~~~
42+
# ~~~~~~~~~~~~~
4343
#
4444
# This tutorial assumes that you have completed the
4545
# `PPO tutorial <reinforcement_ppo.html>`_ which gives
@@ -59,6 +59,8 @@
5959
# -----------------
6060
#
6161

62+
import torchrl
63+
6264
# sphinx_gallery_start_ignore
6365
import warnings
6466
from typing import Tuple
@@ -69,8 +71,6 @@
6971
import torch.cuda
7072
import tqdm
7173

72-
import torchrl
73-
7474
import torch.multiprocessing
7575

7676
###############################################################################
@@ -821,7 +821,9 @@ def make_ddpg_actor(
821821
# - the total number of frames before the collector is considered empty,
822822
# - the maximum number of frames per trajectory (useful for non-terminating
823823
# environments, like ``dm_control`` ones).
824+
#
824825
# .. note::
826+
#
825827
# The ``max_frames_per_traj`` passed to the collector will have the effect
826828
# of registering a new :class:`~torchrl.envs.StepCounter` transform
827829
# with the environment used for inference. We can achieve the same result

0 commit comments

Comments
 (0)