Skip to content

Commit dfcf3e1

Browse files
authored
Improve argument check readability of run_train.py (#1485)
1 parent e2df82b commit dfcf3e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/weathergen/run_train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def train_with_args(argl: list[str], stream_dir: str | None):
183183
if __name__ == "__main__":
184184
# Entry point for slurm script.
185185
# Check whether --from_run_id passed as argument.
186-
if next((True for arg in sys.argv if "--from_run_id" in arg), False):
186+
if any("--from_run_id" in arg for arg in sys.argv):
187187
train_continue()
188188
else:
189189
train()

0 commit comments

Comments
 (0)