-
Notifications
You must be signed in to change notification settings - Fork 243
cp: fix: Use nargs for custom_bash_cmds (2261) into r0.3.0
#2262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -64,7 +64,7 @@ def slurm_executor( | |||||
| nemo_home: str = DEFAULT_NEMO_HOME, | ||||||
| wandb_key: str = None, | ||||||
| network: str = None, | ||||||
| custom_bash_cmds: List[str] = None, | ||||||
| custom_bash_cmds: List[List[str]] = None, | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Implicit Ruff RUF013 flags this, and coding guidelines require Proposed fix- custom_bash_cmds: List[List[str]] = None,
+ custom_bash_cmds: list[list[str]] | None = None,📝 Committable suggestion
Suggested change
🧰 Tools🪛 Ruff (0.14.14)[warning] 67-67: PEP 484 prohibits implicit Convert to (RUF013) 🤖 Prompt for AI Agents |
||||||
| additional_slurm_params: Dict[str, Any] = None, | ||||||
| gres: Optional[str] = None, | ||||||
| ) -> run.SlurmExecutor: | ||||||
|
|
@@ -79,7 +79,7 @@ def slurm_executor( | |||||
| #SBATCH --nodelist=node001,node002 | ||||||
| #SBATCH --constraint=gpu | ||||||
| """ | ||||||
| custom_bash_cmds = [] if custom_bash_cmds is None else custom_bash_cmds | ||||||
| custom_bash_cmds = [] if custom_bash_cmds is None else [" ".join(cmd) for cmd in custom_bash_cmds] | ||||||
| mounts = [] | ||||||
| # Explicitly request GPU resources to ensure proper allocation | ||||||
| # Without --gres=gpu:N, some clusters only allocate 1 GPU regardless of ntasks_per_node | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type hint should be nullable since
default=Nonein argparse.args.custom_bash_cmdscan beNone(the argparse default), and thisNoneis passed straight through toslurm_executorwhich handles it on line 82 ofexecutors.py. The signature here should reflect that.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents