-
Notifications
You must be signed in to change notification settings - Fork 65
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
[Enhance] Support CPU-only train and test in slurm cluster (#189) #191
Conversation
The commands of slurm launch also should be updated if cpu-only~ Lines 252 to 257 in ff137cc
|
The gridsearch command also need update~ mim/mim/commands/gridsearch.py Lines 203 to 208 in ff137cc
|
@@ -382,12 +381,19 @@ def gridsearch( | |||
if not has_job_name: | |||
job_name = osp.splitext(osp.basename(config_path))[0] | |||
parsed_srun_args.append(f'--job-name={job_name}_train') | |||
cmd = [ | |||
if gpus: |
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.
if gpus: | |
if gpus_per_node: |
f'--ntasks={gpus}', f'--ntasks-per-node={gpus_per_node}', | ||
f'--cpus-per-task={cpus_per_task}', '--kill-on-bad-exit=1' | ||
] | ||
if gpus: |
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.
if gpus: | |
if gpus_per_node: |
f'--cpus-per-task={cpus_per_task}', '--kill-on-bad-exit=1' | ||
] + parsed_srun_args + [PYTHON, '-u', train_script, config | ||
] + common_args | ||
if gpus: |
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.
if gpus: | |
if gpus_per_node: |
Close due to the slurm can't launch without gpus, feel free to reopen if you have any question~ |
Motivation
Support CPU-only train and test in slurm cluster. (#189)
Modification
Modify slurm check conditions to "flag = partition is not None"
Checklist