From 155cc81e404cc674bb94c4437e2041163184e5e7 Mon Sep 17 00:00:00 2001 From: Piotr Januszewski Date: Mon, 6 Jul 2020 05:07:27 +0200 Subject: [PATCH] Clarify training intensity configuration docstring (#9244) (#9306) --- rllib/agents/ddpg/ddpg.py | 7 ++++--- rllib/agents/dqn/apex.py | 5 +++-- rllib/agents/dqn/dqn.py | 7 ++++--- rllib/agents/sac/sac.py | 7 ++++--- rllib/contrib/maddpg/maddpg.py | 7 ++++--- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/rllib/agents/ddpg/ddpg.py b/rllib/agents/ddpg/ddpg.py index a61e7778b..9d6e0b889 100644 --- a/rllib/agents/ddpg/ddpg.py +++ b/rllib/agents/ddpg/ddpg.py @@ -106,9 +106,10 @@ DEFAULT_CONFIG = with_common_config({ "prioritized_replay_eps": 1e-6, # Whether to LZ4 compress observations "compress_observations": False, - # If set, this will fix the ratio of sampled to replayed timesteps. - # Otherwise, replay will proceed at the native ratio determined by - # (train_batch_size / rollout_fragment_length). + # If set, this will fix the ratio of replayed from a buffer and learned on + # timesteps to sampled from an environment and stored in the replay buffer + # timesteps. Otherwise, the replay will proceed at the native ratio + # determined by (train_batch_size / rollout_fragment_length). "training_intensity": None, # === Optimization === diff --git a/rllib/agents/dqn/apex.py b/rllib/agents/dqn/apex.py index 6dfee4766..eb1bb57c6 100644 --- a/rllib/agents/dqn/apex.py +++ b/rllib/agents/dqn/apex.py @@ -41,8 +41,9 @@ APEX_DEFAULT_CONFIG = merge_dicts( "exploration_config": {"type": "PerWorkerEpsilonGreedy"}, "worker_side_prioritization": True, "min_iter_time_s": 30, - # If set, this will fix the ratio of sampled to replayed timesteps. - # Otherwise, replay will proceed as fast as possible. + # If set, this will fix the ratio of replayed from a buffer and learned + # on timesteps to sampled from an environment and stored in the replay + # buffer timesteps. Otherwise, replay will proceed as fast as possible. "training_intensity": None, }, ) diff --git a/rllib/agents/dqn/dqn.py b/rllib/agents/dqn/dqn.py index e08f0c169..e94b4e2b6 100644 --- a/rllib/agents/dqn/dqn.py +++ b/rllib/agents/dqn/dqn.py @@ -85,9 +85,10 @@ DEFAULT_CONFIG = with_common_config({ "compress_observations": False, # Callback to run before learning on a multi-agent batch of experiences. "before_learn_on_batch": None, - # If set, this will fix the ratio of sampled to replayed timesteps. - # Otherwise, replay will proceed at the native ratio determined by - # (train_batch_size / rollout_fragment_length). + # If set, this will fix the ratio of replayed from a buffer and learned on + # timesteps to sampled from an environment and stored in the replay buffer + # timesteps. Otherwise, the replay will proceed at the native ratio + # determined by (train_batch_size / rollout_fragment_length). "training_intensity": None, # === Optimization === diff --git a/rllib/agents/sac/sac.py b/rllib/agents/sac/sac.py index ca6b0937d..43c33c639 100644 --- a/rllib/agents/sac/sac.py +++ b/rllib/agents/sac/sac.py @@ -68,9 +68,10 @@ DEFAULT_CONFIG = with_common_config({ "final_prioritized_replay_beta": 0.4, # Whether to LZ4 compress observations "compress_observations": False, - # If set, this will fix the ratio of sampled to replayed timesteps. - # Otherwise, replay will proceed at the native ratio determined by - # (train_batch_size / rollout_fragment_length). + # If set, this will fix the ratio of replayed from a buffer and learned on + # timesteps to sampled from an environment and stored in the replay buffer + # timesteps. Otherwise, the replay will proceed at the native ratio + # determined by (train_batch_size / rollout_fragment_length). "training_intensity": None, # === Optimization === diff --git a/rllib/contrib/maddpg/maddpg.py b/rllib/contrib/maddpg/maddpg.py index 9a0622e2f..217499a70 100644 --- a/rllib/contrib/maddpg/maddpg.py +++ b/rllib/contrib/maddpg/maddpg.py @@ -70,9 +70,10 @@ DEFAULT_CONFIG = with_common_config({ # Observation compression. Note that compression makes simulation slow in # MPE. "compress_observations": False, - # If set, this will fix the ratio of sampled to replayed timesteps. - # Otherwise, replay will proceed at the native ratio determined by - # (train_batch_size / rollout_fragment_length). + # If set, this will fix the ratio of replayed from a buffer and learned on + # timesteps to sampled from an environment and stored in the replay buffer + # timesteps. Otherwise, the replay will proceed at the native ratio + # determined by (train_batch_size / rollout_fragment_length). "training_intensity": None, # Force lockstep replay mode for MADDPG. "multiagent": merge_dicts(COMMON_CONFIG["multiagent"], {