Skip to content

Commit

Permalink
[rllib] Revert [rllib] Port DDPG to the build_tf_policy pattern (ray-…
Browse files Browse the repository at this point in the history
  • Loading branch information
ericl authored and pcmoritz committed Sep 5, 2019
1 parent 1823ea7 commit dcff263
Show file tree
Hide file tree
Showing 6 changed files with 665 additions and 506 deletions.
2 changes: 1 addition & 1 deletion python/ray/ray_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def env_integer(key, default):
# The maximum resource quantity that is allowed. TODO(rkn): This could be
# relaxed, but the current implementation of the node manager will be slower
# for large resource quantities due to bookkeeping of specific resource IDs.
MAX_RESOURCE_QUANTITY = 10000
MAX_RESOURCE_QUANTITY = 20000

# Each memory "resource" counts as this many bytes of memory.
MEMORY_RESOURCE_UNIT_BYTES = 50 * 1024 * 1024
Expand Down
4 changes: 2 additions & 2 deletions rllib/agents/ddpg/ddpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# === Model ===
# Apply a state preprocessor with spec given by the "model" config option
# (like other RL algorithms). This is mostly useful if you have a weird
# observation shape, like an image. Auto-enabled if a custom model is set.
# observation shape, like an image. Disabled by default.
"use_state_preprocessor": False,
# Postprocess the policy network model output with these hidden layers. If
# use_state_preprocessor is False, then these will be the *only* hidden
Expand Down Expand Up @@ -173,7 +173,7 @@ def make_exploration_schedule(config, worker_index):
if config["per_worker_exploration"]:
assert config["num_workers"] > 1, "This requires multiple workers"
if worker_index >= 0:
# Exploration constants from the Ape-X paper
# FIXME: what do magic constants mean? (0.4, 7)
max_index = float(config["num_workers"] - 1)
exponent = 1 + worker_index / max_index * 7
return ConstantSchedule(0.4**exponent)
Expand Down
Loading

0 comments on commit dcff263

Please sign in to comment.