You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix --walltime CLI precedence over input.py settings
Previously, `--walltime` defaulted to `'00:00:00:00'` and was always
passed as a kwarg to `RMG.execute()`, silently overriding any `wallTime`
set in `input.py`. This meant users who set `wallTime` in their input
file and ran without `-t` would have their setting clobbered, giving an
effective wall time of zero (no limit).
Changes:
- Change `--walltime` default to `None`; only add `walltime` and
`max_iterations` to the kwargs dict when they are explicitly provided
on the command line. Input-file values are now respected by default.
- Move walltime/max_iterations override logic earlier in `execute()`
(before database loading), so bad values produce an error immediately
rather than after a potentially long setup phase.
- Extract walltime parsing into a `_parse_walltime_to_seconds()` static
method for clarity and testability; improve the error message to
include the invalid value.
- Log an explicit "Overriding walltime/max_iterations from input file
(...) with command-line value (...)" message whenever the CLI does
override the input file, making precedence visible in the run log.
- Replace bare `return` statements inside nested loops (walltime/maxiter
termination paths) with an `end_early` flag + `break`, so that
`make_seed_mech()`, `check_model()`, and `finish()` are still called
on early termination. Suppress the "MODEL GENERATION COMPLETED" banner
when ending early to avoid misleading output.
- Update docs (`running.rst`) and example input files to document CLI
override behaviour and clarify that `wallTime` can be set in
`input.py` while `--maxiter` is CLI-only.
- Update test for the new `None` default.
0 commit comments