Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tutorials/sphinx-tutorials/coding_ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

"""

# sphinx_gallery_start_ignore
import warnings

######################################################################
# If you are running this in Google Colab, make sure you install the following dependencies:
#
Expand Down Expand Up @@ -105,13 +108,11 @@
# description and more about the algorithm itself.
#

# sphinx_gallery_start_ignore
import warnings
from torch import multiprocessing

warnings.filterwarnings("ignore")
# Set multiprocessing start method to fork if not already set
# This allows the tutorial to run as a script without if __name__ == "__main__"
from torch import multiprocessing

if multiprocessing.get_start_method(allow_none=True) is None:
multiprocessing.set_start_method("fork")
Expand Down
Loading