From 9a6e3293253a2692c50c69c1ed9aec77418ec2e8 Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Sat, 7 Jul 2018 12:10:06 -0700 Subject: [PATCH] [rllib] Move repeat field to asv script (#2367) --- .gitignore | 1 + python/ray/rllib/optimizers/multi_gpu_optimizer.py | 1 - .../tuned_examples/regression_tests/cartpole-a3c-pytorch.yaml | 1 - .../ray/rllib/tuned_examples/regression_tests/cartpole-a3c.yaml | 1 - .../ray/rllib/tuned_examples/regression_tests/cartpole-dqn.yaml | 1 - .../ray/rllib/tuned_examples/regression_tests/cartpole-pg.yaml | 1 - .../ray/rllib/tuned_examples/regression_tests/cartpole-ppo.yaml | 1 - .../rllib/tuned_examples/regression_tests/pendulum-ddpg.yaml | 1 - .../ray/rllib/tuned_examples/regression_tests/pendulum-ppo.yaml | 1 - .../rllib/tuned_examples/regression_tests/regression_test.py | 2 ++ 10 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index f39508468..0598137d8 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ # Python byte code files *.pyc +python/.eggs # Backup files *.bak diff --git a/python/ray/rllib/optimizers/multi_gpu_optimizer.py b/python/ray/rllib/optimizers/multi_gpu_optimizer.py index 1562b96ea..d77844e73 100644 --- a/python/ray/rllib/optimizers/multi_gpu_optimizer.py +++ b/python/ray/rllib/optimizers/multi_gpu_optimizer.py @@ -52,7 +52,6 @@ class LocalMultiGPUOptimizer(PolicyOptimizer): self.update_weights_timer = TimerStat() print("LocalMultiGPUOptimizer devices", self.devices) - print("LocalMultiGPUOptimizer batch size", self.batch_size) assert set(self.local_evaluator.policy_map.keys()) == {"default"}, \ "Multi-agent is not supported" diff --git a/python/ray/rllib/tuned_examples/regression_tests/cartpole-a3c-pytorch.yaml b/python/ray/rllib/tuned_examples/regression_tests/cartpole-a3c-pytorch.yaml index 8c38e1c90..a25da3c77 100644 --- a/python/ray/rllib/tuned_examples/regression_tests/cartpole-a3c-pytorch.yaml +++ b/python/ray/rllib/tuned_examples/regression_tests/cartpole-a3c-pytorch.yaml @@ -1,7 +1,6 @@ cartpole-a3c: env: CartPole-v0 run: A3C - repeat: 3 stop: episode_reward_mean: 200 time_total_s: 600 diff --git a/python/ray/rllib/tuned_examples/regression_tests/cartpole-a3c.yaml b/python/ray/rllib/tuned_examples/regression_tests/cartpole-a3c.yaml index d59078acc..f20ea73c3 100644 --- a/python/ray/rllib/tuned_examples/regression_tests/cartpole-a3c.yaml +++ b/python/ray/rllib/tuned_examples/regression_tests/cartpole-a3c.yaml @@ -1,7 +1,6 @@ cartpole-a3c: env: CartPole-v0 run: A3C - repeat: 3 stop: episode_reward_mean: 200 time_total_s: 600 diff --git a/python/ray/rllib/tuned_examples/regression_tests/cartpole-dqn.yaml b/python/ray/rllib/tuned_examples/regression_tests/cartpole-dqn.yaml index 413773c72..04aa2dc6e 100644 --- a/python/ray/rllib/tuned_examples/regression_tests/cartpole-dqn.yaml +++ b/python/ray/rllib/tuned_examples/regression_tests/cartpole-dqn.yaml @@ -1,7 +1,6 @@ cartpole-dqn: env: CartPole-v0 run: DQN - repeat: 3 stop: episode_reward_mean: 200 time_total_s: 600 diff --git a/python/ray/rllib/tuned_examples/regression_tests/cartpole-pg.yaml b/python/ray/rllib/tuned_examples/regression_tests/cartpole-pg.yaml index ab3af6eb3..2bf9e7548 100644 --- a/python/ray/rllib/tuned_examples/regression_tests/cartpole-pg.yaml +++ b/python/ray/rllib/tuned_examples/regression_tests/cartpole-pg.yaml @@ -1,7 +1,6 @@ cartpole-pg: env: CartPole-v0 run: PG - repeat: 3 stop: episode_reward_mean: 200 time_total_s: 300 diff --git a/python/ray/rllib/tuned_examples/regression_tests/cartpole-ppo.yaml b/python/ray/rllib/tuned_examples/regression_tests/cartpole-ppo.yaml index 9b2b5c8b1..425958e5c 100644 --- a/python/ray/rllib/tuned_examples/regression_tests/cartpole-ppo.yaml +++ b/python/ray/rllib/tuned_examples/regression_tests/cartpole-ppo.yaml @@ -1,7 +1,6 @@ cartpole-ppo: env: CartPole-v0 run: PPO - repeat: 3 stop: episode_reward_mean: 200 time_total_s: 300 diff --git a/python/ray/rllib/tuned_examples/regression_tests/pendulum-ddpg.yaml b/python/ray/rllib/tuned_examples/regression_tests/pendulum-ddpg.yaml index 9dd8ea845..124f756ec 100644 --- a/python/ray/rllib/tuned_examples/regression_tests/pendulum-ddpg.yaml +++ b/python/ray/rllib/tuned_examples/regression_tests/pendulum-ddpg.yaml @@ -1,7 +1,6 @@ pendulum-ddpg: env: Pendulum-v0 run: DDPG - repeat: 3 stop: episode_reward_mean: -160 time_total_s: 900 diff --git a/python/ray/rllib/tuned_examples/regression_tests/pendulum-ppo.yaml b/python/ray/rllib/tuned_examples/regression_tests/pendulum-ppo.yaml index 623b9c268..2e3814f7f 100644 --- a/python/ray/rllib/tuned_examples/regression_tests/pendulum-ppo.yaml +++ b/python/ray/rllib/tuned_examples/regression_tests/pendulum-ppo.yaml @@ -1,7 +1,6 @@ pendulum-ppo: env: Pendulum-v0 run: PPO - repeat: 3 stop: episode_reward_mean: -160 # expect -140 within 300-500k steps diff --git a/python/ray/rllib/tuned_examples/regression_tests/regression_test.py b/python/ray/rllib/tuned_examples/regression_tests/regression_test.py index cc726aa35..9ad1b5113 100644 --- a/python/ray/rllib/tuned_examples/regression_tests/regression_test.py +++ b/python/ray/rllib/tuned_examples/regression_tests/regression_test.py @@ -22,6 +22,8 @@ CONFIG_DIR = os.path.dirname(os.path.abspath(__file__)) def _evaulate_config(filename): with open(os.path.join(CONFIG_DIR, filename)) as f: experiments = yaml.load(f) + for _, config in experiments.items(): + config["repeat"] = 3 ray.init() trials = tune.run_experiments(experiments) results = defaultdict(list)