Skip to content

Commit

Permalink
adding runner tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidandos committed Oct 24, 2023
1 parent eb06706 commit c6452ee
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pax/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ def main(args):
print(f"Number of Training Iterations: {args.num_iters}")

if args.runner in ["evo", "evo_mixed_lr", "evo_hardstop", "evo_mixed_payoff", "evo_mixed_ipd_payoff",
"evo_mixed_payoff_gen", "evo_mixed_payoff_input", "evo_mixed_payoff_pred", "evo_scanned", "evo_mixed_payoff_only_opp", "multishaper_evo", "evo_nroles"]:
"evo_mixed_payoff_gen", "evo_mixed_payoff_input", "evo_scanned", "evo_mixed_payoff_only_opp", "multishaper_evo", "evo_nroles"]:
print(f"Running {args.runner}")

runner.run_loop(env_params, agent_pair, args.num_iters, watchers)
Expand Down
36 changes: 36 additions & 0 deletions test/runners/test_runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,39 @@ def test_runner_marl_nplayer():
_test_runner(
["+experiment/multiplayer_ipd=lola_vs_ppo_ipd", "++num_inner_steps=10"]
)


def test_runner_evo_hardstop():
_test_runner(["+experiment/ipd=shaper_att_v_tabular", "++runner=evo_hardstop"])


def test_runner_evo_mixed_rl():
_test_runner(["+experiment/ipd=shaper_att_v_tabular", "++runner=evo_mixed_lr"])


def test_runner_evo_mixed_payoff():
_test_runner(["+experiment/ipd=shaper_att_v_tabular", "++runner=evo_mixed_payoff"])


def test_runner_evo_mixed_ipd_payoff():
_test_runner(["+experiment/ipd=shaper_att_v_tabular", "++runner=evo_mixed_ipd_payoff"])


def test_runner_evo_mixed_payoff_gen():
_test_runner(["+experiment/ipd=shaper_att_v_tabular", "++runner=evo_mixed_payoff_gen"])


def test_runner_evo_mixed_payoff_input():
_test_runner(["+experiment/ipd=shaper_att_v_tabular", "++runner=evo_mixed_payoff_input"])


def test_runner_evo_mixed_payoff_input():
_test_runner(["+experiment/ipd=shaper_att_v_tabular", "++runner=evo_mixed_payoff_input"])


def test_runner_evo_scanned():
_test_runner(["+experiment/ipd=shaper_att_v_tabular", "++runner=evo_scanned"])


def test_runner_evo_mixed_payoff_only_opp():
_test_runner(["+experiment/ipd=shaper_att_v_tabular", "++runner=evo_mixed_payoff_only_opp"])

0 comments on commit c6452ee

Please sign in to comment.