Skip to main content

Plugin for Airflow to connect to slurm clusters

Project description

PyPI PyPI - Downloads

Slurm Executor

The Slurm executor is based on work done by Hanno Holties in https://git.astron.nl/eosc/slurmexecutorplugin, this one extends the use of parameters to be passed to the Slurm cluster so one can control the partition, the account, and other details about the jobs submission.

It was changed from srun to sbatch as a default command to interact with the cluster, so multiple jobs can be submitted at a time.

To use the plugin after installing the package change the AIRFLOW configuration file as such:

# The executor class that airflow should use. Choices include
# SequentialExecutor, LocalExecutor, CeleryExecutor, DaskExecutor, KubernetesExecutor
executor = airflow_slurm_executor.SlurmExecutor

Custom Use

One can pass the executor_config parameter in the default_args attribute to any DAG to customize some aspects of the job.

with DAG(
    dag_id="my_dag",
    start_date=pendulum.datetime(2016, 1, 1),
    schedule="@daily",
    default_args={"executor_config": {"SlurmExecutor: {"attribute": "value"}},
                  "queue": "QUEUE"},
):

The QUEUE parameter defined as default argument will be translated as the partition to be used by slurm.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airflow_slurm_executor-0.0.9.tar.gz (8.1 kB view details)

Uploaded Source

File details

Details for the file airflow_slurm_executor-0.0.9.tar.gz.

File metadata

  • Download URL: airflow_slurm_executor-0.0.9.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for airflow_slurm_executor-0.0.9.tar.gz
Algorithm Hash digest
SHA256 4aa4860ba22d0991244127ab44cb28a6484524d0aa5231b4447046282839b403
MD5 065ae5479ea7de86d5e37948adf38b19
BLAKE2b-256 de2537f83278f0bfd357cf92f65da00e47a6c83d97cdab97a3bd04f433ad4158

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page