We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc52689 commit 9b79d27Copy full SHA for 9b79d27
pytorch_lightning/trainer/properties.py
@@ -120,7 +120,10 @@ def is_global_zero(self) -> bool:
120
def slurm_job_id(self) -> Optional[int]:
121
job_id = os.environ.get('SLURM_JOB_ID')
122
if job_id:
123
- job_id = int(job_id)
+ try:
124
+ job_id = int(job_id)
125
+ except ValueError:
126
+ job_id = None
127
128
# in interactive mode, don't make logs use the same job id
129
in_slurm_interactive_mode = os.environ.get('SLURM_JOB_NAME') == 'bash'
0 commit comments