70
70
import tqdm
71
71
72
72
import torch .multiprocessing
73
- torch .multiprocessing .set_start_method ('spawn' )
74
73
75
74
###############################################################################
76
75
# We will execute the policy on CUDA if available
@@ -766,7 +765,7 @@ def make_ddpg_actor(
766
765
module = q_net ,
767
766
).to (device )
768
767
769
- # init lazy moduless
768
+ # initialize lazy modules
770
769
qnet (actor (proof_environment .reset ()))
771
770
return actor , qnet
772
771
@@ -781,7 +780,7 @@ def make_ddpg_actor(
781
780
# ~~~~~~~~~~~
782
781
#
783
782
# The policy is wrapped in a :class:`~torchrl.modules.OrnsteinUhlenbeckProcessWrapper`
784
- # exploration module, as suggesed in the original paper.
783
+ # exploration module, as suggested in the original paper.
785
784
# Let's define the number of frames before OU noise reaches its minimum value
786
785
annealing_frames = 1_000_000
787
786
@@ -808,7 +807,7 @@ def make_ddpg_actor(
808
807
#
809
808
# Here we will use
810
809
# :class:`~torchrl.collectors.MultiaSyncDataCollector`, a data collector that
811
- # will be executed in an async manner (i.e. data will be collected while
810
+ # will be executed in an asynchronous manner (for example, data will be collected while
812
811
# the policy is being optimized). With the :class:`MultiaSyncDataCollector`,
813
812
# multiple workers are running rollouts separately. When a batch is asked, it
814
813
# is gathered from the first worker that can provide it.
@@ -962,7 +961,7 @@ def make_replay_buffer(buffer_size, batch_size, random_crop_len, prefetch=3, prb
962
961
963
962
964
963
###############################################################################
965
- # We'll store the replay buffer in a temporary dirrectory on disk
964
+ # We'll store the replay buffer in a temporary directory on disk
966
965
967
966
import tempfile
968
967
0 commit comments