We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8870fef commit 817e892Copy full SHA for 817e892
advanced_source/coding_ddpg.py
@@ -70,7 +70,10 @@
70
# TorchRL prefers spawn method, that restricts creation of ``~torchrl.envs.ParallelEnv`` inside
71
# `__main__` method call, but for the easy of reading the code switch to fork
72
# which is also a default spawn method in Google's Colaboratory
73
-multiprocessing.set_start_method("fork")
+try:
74
+ multiprocessing.set_start_method("fork")
75
+except RuntimeError:
76
+ assert multiprocessing.get_start_method() == "fork"
77
# sphinx_gallery_end_ignore
78
79
0 commit comments