Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions scripts/performance/argument_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,10 @@ def parse_cli_args():
slurm_args.add_argument(
"-cb",
"--custom_bash_cmds",
type=list_of_strings,
help="Comma separated string of bash commands",
default=[],
nargs="*",
action="append",
help="List of bash commands to execute before the main command",
default=None,
)
slurm_args.add_argument(
"--gres",
Expand Down
2 changes: 1 addition & 1 deletion scripts/performance/setup_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def main(
custom_mounts: List[str],
custom_env_vars: Dict[str, str],
custom_srun_args: List[str],
custom_bash_cmds: List[str],
custom_bash_cmds: List[List[str]],
nccl_ub: bool,
pretrained_checkpoint: Optional[str],
num_gpus: int,
Expand Down
4 changes: 2 additions & 2 deletions scripts/performance/utils/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
additional_slurm_params: Dict[str, Any] = None,
gres: Optional[str] = None,
) -> run.SlurmExecutor:
Expand All @@ -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
Expand Down
Loading