forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tune] Support user-defined trainable functions / classes / envs with…
… a shared object registry (ray-project#1226)
- Loading branch information
1 parent
9233e49
commit 316f9e2
Showing
38 changed files
with
739 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from __future__ import absolute_import | ||
from __future__ import division | ||
from __future__ import print_function | ||
|
||
from ray.tune.registry import register_trainable | ||
from ray.rllib import ppo, es, dqn, a3c | ||
from ray.rllib.agent import _MockAgent, _SigmoidFakeData | ||
|
||
|
||
def _register_all(): | ||
register_trainable("PPO", ppo.PPOAgent) | ||
register_trainable("ES", es.ESAgent) | ||
register_trainable("DQN", dqn.DQNAgent) | ||
register_trainable("A3C", a3c.A3CAgent) | ||
register_trainable("__fake", _MockAgent) | ||
register_trainable("__sigmoid_fake_data", _SigmoidFakeData) | ||
|
||
|
||
_register_all() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
python/ray/rllib/tuned_examples/cartpole-grid-search-example.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
cartpole-ppo: | ||
env: CartPole-v0 | ||
alg: PPO | ||
run: PPO | ||
stop: | ||
episode_reward_mean: 200 | ||
time_total_s: 180 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
hopper-ppo: | ||
env: Hopper-v1 | ||
alg: PPO | ||
run: PPO | ||
resources: | ||
cpu: 64 | ||
gpu: 4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
humanoid-es: | ||
env: Humanoid-v1 | ||
alg: ES | ||
run: ES | ||
resources: | ||
cpu: 100 | ||
driver_cpu_limit: 4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
humanoid-ppo-gae: | ||
env: Humanoid-v1 | ||
alg: PPO | ||
run: PPO | ||
stop: | ||
episode_reward_mean: 6000 | ||
resources: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
humanoid-ppo: | ||
env: Humanoid-v1 | ||
alg: PPO | ||
run: PPO | ||
stop: | ||
episode_reward_mean: 6000 | ||
resources: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
cartpole-ppo: | ||
env: CartPole-v0 | ||
alg: PPO | ||
run: PPO | ||
repeat: 3 | ||
stop: | ||
episode_reward_mean: 200 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
pong-a3c: | ||
env: PongDeterministic-v4 | ||
alg: A3C | ||
run: A3C | ||
resources: | ||
cpu: 16 | ||
driver_cpu_limit: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
walker2d-v1-ppo: | ||
env: Walker2d-v1 | ||
alg: PPO | ||
run: PPO | ||
resources: | ||
cpu: 64 | ||
gpu: 4 | ||
|
Oops, something went wrong.