From c2b88d7c9c1c0e3225d5e4bbdb8904d551be1278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=8B=9C=EC=9B=90?= Date: Thu, 7 May 2026 15:58:10 +0900 Subject: [PATCH] Use configured train device --- AGENTS.md | 2 +- src/coolrl_lost_cities/games/classic/deep_cfr/cli.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 254d950..ef1d69f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -93,13 +93,13 @@ Useful train controls: - `--resume`: resume from `/latest.pt`. - `--resume PATH`: resume from a specific checkpoint. -- `--device DEVICE`: override the trainer device for this invocation. - `--set PATH=VALUE`: override config fields. It is repeatable and parses values as YAML, e.g. `--set traversal.num_workers=4` or `--set run.max_hours=null`. Common `--set` overrides: +- `--set run.device=cuda`: set the trainer device. - `--set checkpoint.exact_resume=true`: require checkpoint config compatibility. - `--set checkpoint.save_latest=false --set checkpoint.save_every_iteration=false --set checkpoint.save_iteration_interval=0`: disable checkpoint writes. diff --git a/src/coolrl_lost_cities/games/classic/deep_cfr/cli.py b/src/coolrl_lost_cities/games/classic/deep_cfr/cli.py index 5fd73e8..9c6aca5 100644 --- a/src/coolrl_lost_cities/games/classic/deep_cfr/cli.py +++ b/src/coolrl_lost_cities/games/classic/deep_cfr/cli.py @@ -105,7 +105,7 @@ def train_command(args: argparse.Namespace) -> None: trainer = DeepCFRTrainer( config, config.rules.to_lost_cities_config(seed=config.run.seed), - device=args.device or config.run.device, + device=config.run.device, extra_trackers=extra_trackers or None, ) if resume_path: @@ -204,7 +204,6 @@ def main(argv: list[str] | None = None) -> None: train = subparsers.add_parser("train") train.add_argument("--config") train.add_argument("--resume", nargs="?", const=_RESUME_LATEST, default=None) - train.add_argument("--device") train.add_argument( "--set", action="append",