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.
This commit is contained in:
Quoding 2023-03-31 13:43:21 -04:00 committed by GitHub
parent 7f8fa241dd
commit 4ac407c78f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -237,12 +237,6 @@ def train_agent(
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]