Skip to content

Commit dc4ef69

Browse files
committed
Convert override flag to positional
1 parent 4e18bf4 commit dc4ef69

4 files changed

Lines changed: 22 additions & 20 deletions

File tree

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,14 @@ stores rollout animations for the specified test batches.
4040
AutoCast now ships with an optional [Weights & Biases](https://wandb.ai/) integration that is
4141
fully driven by the Hydra config under `configs/logging/wandb.yaml`.
4242

43-
- Enable logging for CLI workflows by overriding `logging.wandb.enabled=true` and
44-
optionally providing `project`, `name`, or `tags` overrides:
43+
- Enable logging for CLI workflows by passing Hydra config overrides as positional arguments:
4544

4645
```bash
4746
uv run train_processor \
4847
--config-path=configs \
49-
--override logging.wandb.enabled=true \
50-
--override logging.wandb.project=autocast-experiments \
51-
--override logging.wandb.name=processor-baseline
48+
logging.wandb.enabled=true \
49+
logging.wandb.project=autocast-experiments \
50+
logging.wandb.name=processor-baseline
5251
```
5352

5453
- The autoencoder/processor training CLIs pass the configured `WandbLogger` directly into Lightning so that metrics, checkpoints, and artifacts are synchronized automatically.

src/autocast/eval/processor.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,12 @@ def parse_args() -> argparse.Namespace:
7676
help="Hydra config name to compose (defaults to 'processor').",
7777
)
7878
parser.add_argument(
79-
"--override",
80-
dest="overrides",
81-
action="append",
82-
default=[],
83-
help="Optional Hydra override, e.g. --override trainer.max_epochs=5",
79+
"overrides",
80+
nargs="*",
81+
help=(
82+
"Hydra config overrides (e.g. trainer.max_epochs=5"
83+
"logging.wandb.enabled=true)"
84+
),
8485
)
8586
parser.add_argument(
8687
"--autoencoder-checkpoint",

src/autocast/train/autoencoder.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ def parse_args() -> argparse.Namespace:
4949
help="Hydra config name to compose (defaults to 'config').",
5050
)
5151
parser.add_argument(
52-
"--override",
53-
dest="overrides",
54-
action="append",
55-
default=[],
56-
help="Optional Hydra override, e.g. --override trainer.max_epochs=5",
52+
"overrides",
53+
nargs="*",
54+
help=(
55+
"Hydra config overrides (e.g. trainer.max_epochs=5 "
56+
"logging.wandb.enabled=true)"
57+
),
5758
)
5859
parser.add_argument(
5960
"--work-dir",

src/autocast/train/processor.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ def parse_args() -> argparse.Namespace:
5555
help="Hydra config name to compose (defaults to 'processor').",
5656
)
5757
parser.add_argument(
58-
"--override",
59-
dest="overrides",
60-
action="append",
61-
default=[],
62-
help="Optional Hydra override, e.g. --override trainer.max_epochs=5",
58+
"overrides",
59+
nargs="*",
60+
help=(
61+
"Hydra config overrides (e.g. trainer.max_epochs=5 "
62+
"logging.wandb.enabled=true)"
63+
),
6364
)
6465
parser.add_argument(
6566
"--autoencoder-checkpoint",

0 commit comments

Comments
 (0)