Skip to content

Commit

Permalink
sweeps are a bit safer
Browse files Browse the repository at this point in the history
  • Loading branch information
thatguy11325 committed Nov 2, 2024
1 parent 6c5143a commit 9699c1c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pokemonred_puffer/sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ def launch_sweep(
if (
"environment/stats/required_count" in summary_metrics
and "performance/uptime" in summary_metrics
# Only count agents that have run more than 1M steps
and "Overview/agent_steps" in summary_metrics
and summary_metrics["overview/agent_steps"] > 1e6
):
obs_in = ObservationInParam(
input={
Expand Down Expand Up @@ -242,7 +245,10 @@ def _fn():
}
)
agent_config = update_base_config(base_config, agent_config)
train.train(config=agent_config, debug=debug, track=True)
try:
train.train(config=agent_config, debug=debug, track=True)
except Exception as e:
print(f"Exception in training: {e!r}")

for _ in range(99999):
# Manually reset the env id counter between runs
Expand Down

0 comments on commit 9699c1c

Please sign in to comment.