Skip to content

Commit

Permalink
Update Slurm Launcher (EleutherAI#59)
Browse files Browse the repository at this point in the history
* Fix SLURM runner comment handling

* Add --account in Slurm Launcher

* fix switch of --account + --comment

* Add `--account` runner argument
  • Loading branch information
haileyschoelkopf authored Jan 19, 2024
1 parent 9920f1b commit a1af9e7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion deepspeed/launcher/multinode_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,12 @@ def get_cmd(self, environment, active_resources):
if getattr(self.args, 'comment', ''):
srun_cmd += ['--comment', self.args.comment]

if getattr(self.args, 'account', ''):
srun_cmd += ['--account', self.args.account]

if self.args.include != "":
srun_cmd.append('--nodelist')
srun_cmd.append(self._pdsh_include_to_nodelist(self.args.include))
srun_cmd += ['--comment', self.args.slurm_comment]

if self.args.num_nodes > 0:
srun_cmd.append('--nodes')
Expand Down
9 changes: 8 additions & 1 deletion deepspeed/launcher/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,14 @@ def parse_args(args=None):
"--comment",
default="",
type=str,
help="A comment that can be used for metadata."
help="A comment that can be used for metadata. Used to pass --comment argument to srun in Slurm launcher"
)

parser.add_argument(
"--account",
default="",
type=str,
help="Used to pass --account argument to srun in Slurm launcher"
)

parser.add_argument("--elastic_training",
Expand Down

0 comments on commit a1af9e7

Please sign in to comment.