Skip to content

Make submission script more human readable #431

Description

@lesteve
from dask_jobqueue import SLURMCluster 
cluster = SLURMCluster(cores=1, memory='1GB') 
print(cluster.job_script()) 
#!/usr/bin/env bash

#SBATCH -J dask-worker
#SBATCH -n 1
#SBATCH --cpus-per-task=1
#SBATCH --mem=954M
#SBATCH -t 00:30:00

/home/lesteve/miniconda3/bin/python -m distributed.cli.dask_worker tcp://192.168.0.11:44065 --nthreads 1 --memory-limit 1000.00MB --name name --nanny --death-timeout 60

Wouldn't it be nice if the last line use backslashes to be more human-readable i.e. something like:

/home/lesteve/miniconda3/bin/python -m distributed.cli.dask_worker \
    tcp://192.168.0.11:44065 \
    --nthreads 1 \
    --memory-limit 1000.00MB \
    --name name \
    --nanny --death-timeout 60

Full disclosure: not sure if there is an easy way to do this or if you have to write a little bit of code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions