Remove duplicate code in adaptive param noise. (#976)
This commit is contained in:
@@ -378,11 +378,6 @@ class DDPG(object):
|
|||||||
self.param_noise_stddev: self.param_noise.current_stddev,
|
self.param_noise_stddev: self.param_noise.current_stddev,
|
||||||
})
|
})
|
||||||
|
|
||||||
if MPI is not None:
|
|
||||||
mean_distance = MPI.COMM_WORLD.allreduce(distance, op=MPI.SUM) / MPI.COMM_WORLD.Get_size()
|
|
||||||
else:
|
|
||||||
mean_distance = distance
|
|
||||||
|
|
||||||
if MPI is not None:
|
if MPI is not None:
|
||||||
mean_distance = MPI.COMM_WORLD.allreduce(distance, op=MPI.SUM) / MPI.COMM_WORLD.Get_size()
|
mean_distance = MPI.COMM_WORLD.allreduce(distance, op=MPI.SUM) / MPI.COMM_WORLD.Get_size()
|
||||||
else:
|
else:
|
||||||
|
@@ -15,8 +15,7 @@ class RolloutWorker:
|
|||||||
"""Rollout worker generates experience by interacting with one or many environments.
|
"""Rollout worker generates experience by interacting with one or many environments.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
make_env (function): a factory function that creates a new instance of the environment
|
venv: vectorized gym environments.
|
||||||
when called
|
|
||||||
policy (object): the policy that is used to act
|
policy (object): the policy that is used to act
|
||||||
dims (dict of ints): the dimensions for observations (o), goals (g), and actions (u)
|
dims (dict of ints): the dimensions for observations (o), goals (g), and actions (u)
|
||||||
logger (object): the logger that is used by the rollout worker
|
logger (object): the logger that is used by the rollout worker
|
||||||
|
Reference in New Issue
Block a user