Skip to content

Commit 4560f88

Browse files
authored
Update reinforcement_ppo.py
1 parent d7e5fe5 commit 4560f88

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

intermediate_source/reinforcement_ppo.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,11 @@
104104
# description and more about the algorithm itself.
105105
#
106106

107-
# sphinx_gallery_start_ignore
108-
import warnings
109-
110107
warnings.filterwarnings("ignore")
111108
from torch import multiprocessing
112109

110+
# sphinx_gallery_start_ignore
111+
113112
# TorchRL prefers spawn method, that restricts creation of ``~torchrl.envs.ParallelEnv`` inside
114113
# `__main__` method call, but for the easy of reading the code switch to fork
115114
# which is also a default spawn method in Google's Colaboratory
@@ -139,7 +138,6 @@
139138
from torchrl.objectives import ClipPPOLoss
140139
from torchrl.objectives.value import GAE
141140
from tqdm import tqdm
142-
import multiprocessing
143141

144142
######################################################################
145143
# Define Hyperparameters

0 commit comments

Comments
 (0)