mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-28 13:20:31 +08:00
slurm job id (#1605)
This commit is contained in:
1 parent
d1279afff8
commit
791ba91dec
1 file changed
+6
@@ -508,6 +508,12 @@ class Trainer(
|
||||
try:
|
||||
job_id = os.environ['SLURM_JOB_ID']
|
||||
job_id = int(job_id)
|
||||
|
||||
# in interactive mode, don't make logs use the same job id
|
||||
in_slurm_interactive_mode = os.environ['SLURM_JOB_NAME'] == 'bash'
|
||||
if in_slurm_interactive_mode:
|
||||
job_id = None
|
||||
|
||||
except Exception:
|
||||
job_id = None
|
||||
return job_id
|
||||
|
||||
Reference in new issue
Block a user