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:
parent
7f8fa241dd
commit
4ac407c78f
@ -237,12 +237,6 @@ def train_agent(
|
|||||||
def stop_fn(mean_rewards):
|
def stop_fn(mean_rewards):
|
||||||
return False
|
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):
|
def reward_metric(rews):
|
||||||
return rews[:, 0]
|
return rews[:, 0]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user