Skip to content

Commit 5aa20e5

Browse files
committed
Fix league summary typing for CI train
1 parent aedccbd commit 5aa20e5

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

train.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -320,16 +320,19 @@ def main() -> None:
320320
if cfg_bool("league_enabled") and len(eval_level_summaries) > 0:
321321
try:
322322
champion_entry = resolve_champion_entry(current_checkpoint_path=manual_ckpt)
323-
champion_series_summary = None
323+
champion_series_summary: dict[str, float | int | str] | None = None
324324
if champion_entry is not None and cfg_int("league_champion_games") > 0:
325-
champion_series_summary = run_match_results_to_summary(
326-
checkpoint_a=manual_ckpt,
327-
checkpoint_b=champion_entry.artifact_path,
328-
games=cfg_int("league_champion_games"),
329-
device=device,
330-
mcts_sims=cfg_int("eval_sims"),
331-
c_puct=cfg_float("c_puct"),
332-
seed=cfg_int("seed") + 200_000 + iteration,
325+
champion_series_summary = cast(
326+
dict[str, float | int | str],
327+
run_match_results_to_summary(
328+
checkpoint_a=manual_ckpt,
329+
checkpoint_b=champion_entry.artifact_path,
330+
games=cfg_int("league_champion_games"),
331+
device=device,
332+
mcts_sims=cfg_int("eval_sims"),
333+
c_puct=cfg_float("c_puct"),
334+
seed=cfg_int("seed") + 200_000 + iteration,
335+
),
333336
)
334337
monitor.log_warning(
335338
iteration=iteration,

0 commit comments

Comments
 (0)