Skip to content

Make the default auto-requeue signal in SLURM environments configurable #21404

@martenlienen

Description

@martenlienen

Description & Motivation

I have to use a requeue-signal other than SIGUSR1 for technical reasons, which is the hard coded default at the moment. While I can use SLURMEnvironment(requeue_signal=signal.SIGUSR2) as a plugin, I would like to only set that in cases where I actually am in a SLURM environment without having to re-implement the environment detection inside of lightning. In other words, I still want to be able to just run my script locally in a LightningEnvironment.

Pitch

I want to move the hard-coded constant here into a class constant, so that I can change it from the outside.

Alternatives

Re-implementing environment detection myself so that I can pass an argument to just the SLURM environment, but that seems like too much work and needless duplication.

Additional context

No response

cc @lantiga

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIs an improvement or enhancementneeds triageWaiting to be triaged by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions