From 4ac407c78f58102fa7f38ded6bfc1e42c703a4a7 Mon Sep 17 00:00:00 2001 From: Quoding <46576765+Quoding@users.noreply.github.com> Date: Fri, 31 Mar 2023 13:43:21 -0400 Subject: [PATCH] Remove test_fn and train_fn as they are not used in PPO PistonBall example for PettingZoo (#840) Specifically, BasePolicy.set_eps seems to be a remnant from using DQN in other examples. * Removed unused functions (test_fn and train_fn) from the pettingzoo example with PistonBall. These functions use set_eps which is not available for PPO and is not even called once in the file. --- test/pettingzoo/pistonball_continuous.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/pettingzoo/pistonball_continuous.py b/test/pettingzoo/pistonball_continuous.py index 6ffb5ec62..c79746f05 100644 --- a/test/pettingzoo/pistonball_continuous.py +++ b/test/pettingzoo/pistonball_continuous.py @@ -237,12 +237,6 @@ def save_best_fn(policy): def stop_fn(mean_rewards): return False - def train_fn(epoch, env_step): - [agent.set_eps(args.eps_train) for agent in policy.policies.values()] - - def test_fn(epoch, env_step): - [agent.set_eps(args.eps_test) for agent in policy.policies.values()] - def reward_metric(rews): return rews[:, 0]