Skip to content

Commit

Permalink
fix pistonball tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Yifei Cheng committed Apr 15, 2022
1 parent f938040 commit 2f1dcc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/pettingzoo/pistonball.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def reward_metric(rews):
def watch(
args: argparse.Namespace = get_args(), policy: Optional[BasePolicy] = None
) -> None:
env = get_env()
env = DummyVectorEnv([get_env])
policy.eval()
[agent.set_eps(args.eps_test) for agent in policy.policies.values()]
collector = Collector(policy, env, exploration_noise=True)
Expand Down
2 changes: 1 addition & 1 deletion test/pettingzoo/pistonball_continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def reward_metric(rews):
def watch(
args: argparse.Namespace = get_args(), policy: Optional[BasePolicy] = None
) -> None:
env = get_env()
env = DummyVectorEnv([get_env])
policy.eval()
collector = Collector(policy, env)
result = collector.collect(n_episode=1, render=args.render)
Expand Down

0 comments on commit 2f1dcc2

Please sign in to comment.