enjoy-slurm
is a naive slurm control package for python. It does interact with Slurm exactly as any user would do, simply through the command
line tools and arguments. That's why we call it naive. However, it should avoid having to rewrite some scripts required to submit and control many
Slurm jobs on an HPC computer. This package is a successor of the retired HPC scheduler package.
- Use
sbatch
andsacct
directly from python with a pythonic API. - Parse command outputs into python objects like pandas DataFrames or dictionaries.
import enjoy_slurm as slurm
jobid = slurm.sbatch("job.sh", partition="compute", account="my_account")
acct = slurm.sacct(jobid=jobid)
# run another job that depends on the first
jobid1 = slurm.sbatch(
"another_job.sh", dependency=jobid, partition="shared", account="my_account"
)
acct1 = slurm.sacct(jobid=jobid1)
Project based on the cookiecutter science project template.