Skip to content

core.py's Job class default regex not selecting correct job id #699

@jsmucker

Description

@jsmucker

I have a python code that uses dask_jobqueue's PBSCluster to manage workers on an HPC.

Within this environment, the qsub command calls a wrapper which does several important things for the environment before actually qsubbing the job. This wrapper sometimes prints informational messages to stdout (these messages contain text, numbers, newlines, etc) before listing the job id.

When this happens, the default regex for core.py's Job class ( (?P<job_id>\d+) ) will pull out the wrong string thinking it is the job id when it is in fact not.

One solution I had to this problem was subclassing Job and making _job_id_from_submit_output apply the regex to the last line of the stdout from qsub. I suppose I could also change the regex to something more robust too.

In practice the workarounds would be sufficient, however every change made to already existing software that uses dask at my work requires recertification, which draws more resources.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions