-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak cli. add --sbatch and --salloc as alternatives to --alloc and -…
…-persist (#119) * Split `mila` function into chunks Signed-off-by: Fabrice Normandin <normandf@mila.quebec> * Make `mila code` default to `mila code .` Signed-off-by: Fabrice Normandin <normandf@mila.quebec> * Make the job_id an int instead of str Signed-off-by: Fabrice Normandin <normandf@mila.quebec> * Add --salloc and --sbatch flags (see desc.) - Adds a --salloc flag which is exaclty the same as using the '--alloc' flag (without the --persist) flag. - Adds a --sbatch flag which is the same as doing --persist --alloc ... I think these are more naturally understood as the argument that are passed to `salloc` and `sbatch` respectively. Also, these two new args are in a mutually exclusive group with --persist. Signed-off-by: Fabrice Normandin <normandf@mila.quebec> * Put the --alloc/--salloc/--sbatch args last Signed-off-by: Fabrice Normandin <normandf@mila.quebec> * Add missing regression test file Signed-off-by: Fabrice Normandin <normandf@mila.quebec> --------- Signed-off-by: Fabrice Normandin <normandf@mila.quebec>
- Loading branch information
Showing
10 changed files
with
219 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,33 @@ | ||
usage: mila code [-h] [--cluster {mila,cedar,narval,beluga,graham}] | ||
[--alloc ...] [--command VALUE] [--job VALUE] [--node VALUE] | ||
[--persist] | ||
PATH | ||
[--command VALUE] [--job JOB_ID] [--node NODE] [--persist] | ||
[--alloc ...] [--salloc ...] [--sbatch ...] | ||
[PATH] | ||
|
||
positional arguments: | ||
PATH Path to open on the remote machine | ||
PATH Path to open on the remote machine. Defaults to $HOME. | ||
Can be a relative or absolute path. When a relative | ||
path (that doesn't start with a '/', like foo/bar) is | ||
passed, the path is relative to the $HOME directory on | ||
the selected cluster. For example, foo/project will be | ||
interpreted as $HOME/foo/project. | ||
|
||
optional arguments: | ||
-h, --help show this help message and exit | ||
--alloc ... Extra options to pass to slurm | ||
--cluster {mila,cedar,narval,beluga,graham} | ||
Which cluster to connect to. | ||
--command VALUE Command to use to start vscode (defaults to "code" or | ||
the value of $MILATOOLS_CODE_COMMAND) | ||
--job VALUE Job ID to connect to | ||
--node VALUE Node to connect to | ||
--persist Whether the server should persist or not | ||
--job JOB_ID Job ID to connect to | ||
--node NODE Node to connect to | ||
|
||
Allocation optional arguments: | ||
Extra options to pass to slurm. | ||
|
||
--persist Whether the server should persist or not when using | ||
--alloc | ||
--alloc ... Extra options to pass to salloc or to sbatch if | ||
--persist is set. | ||
--salloc ... Extra options to pass to salloc. Same as using --alloc | ||
without --persist. | ||
--sbatch ... Extra options to pass to sbatch. Same as using --alloc | ||
with --persist. |
Oops, something went wrong.