We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da2337a commit 88dd6b4Copy full SHA for 88dd6b4
mb_discovery/slurm.py
@@ -29,6 +29,7 @@ def slurm_submit_python(
29
pre_cmd: str = "",
30
) -> None:
31
"""Slurm submits a python script using `sbatch --wrap 'python path/to/file.py'`.
32
+
33
Usage: Call this function at the top of the script (before doing any real work) and
34
then submit a job with `python path/to/file.py slurm-submit`. The slurm job will run
35
the whole script.
@@ -68,7 +69,7 @@ def slurm_submit_python(
68
69
running_as_slurm_job = "SLURM_JOB_ID" in os.environ
70
if running_as_slurm_job or "slurm-submit" in sys.argv:
71
# print sbatch command at submission time and into slurm log file
- # but not when running interactively
72
+ # but not when running in command line or Jupyter
73
print(" ".join(cmd))
74
75
if "slurm-submit" not in sys.argv:
0 commit comments