Skip to content
MetOfficePublic

About

Scheduler-agnostic DAG execution through decoupled graph definition and orchestration.

Topics

Resources

Contributing

Stars

5 stars

Watchers

7 watching

Forks

Repository files navigation

Python Project GitHub Tag License Experimental Static Badge PR CI status pre-commit

dagrunner_icon

DAGrunner is an abstraction layer for executing Directed Acyclic Graphs (DAGs), providing portability and standardization across different schedulers. Rather than building your graph execution logic around a specific scheduler (such as Dask or Ray), DAGrunner enables you to define your graph once in NetworkX format and execute it with any supported scheduler without modifying your underlying graph definition. It decouples the scientific configuration and graph recipe from execution concerns, ensuring that your graph remains independent of scheduling technology choices. Additionally, DAGrunner provides a unified tooling layer that includes scheduler-agnostic graph visualization, scheduler-independent logging and monitoring, and other operational utilities, allowing you to maintain consistent workflows regardless of which back-end scheduler you choose.

Documentation

DAGrunner takes advantage of the native markdown rendering support provided by github. To that end, all documentation of DAGrunner resides in markdown files.

API

See DAGrunner API

License/copyright

(C) Crown Copyright, Met Office. All rights reserved.

This file is part of 'DAGrunner' and is released under the BSD 3-Clause license. See LICENSE in the root of the repository for full licensing details.

Installation

The package is pip installable.

pip install .

(uninstall: pip uninstall dagrunner)

This will also make an executable script available to the PATH: dagrunner-execute-graph

Execution of a networkx graph using dagrunner-execute-graph script

usage: dagrunner-execute-graph [-h] [--scheduler SCHEDULER] [--num-workers NUM_WORKERS] [--profiler-filepath PROFILER_FILEPATH] [--dry-run] [--verbose] networkx-graph

see dagrunner-execute-graph --help for more information.

Example DAGrunner usage

See docs/demo.ipynb

Processing modules (aka plugins)

DAGrunner concerns itself with graph execution and does not strictly require processing modules (plugins) to take any particular form. That is, you may or may not choose to use or subclass the plugins provided by DAGrunner. However, for convenience, DAGrunner does define some plugins which fall into two broad categories, some abstract and some for use as they are.

See here for more information.

Schedulers

The dagrunner-execute-graph script exposes a scheduler argument for specifying our preferred scheduler. DAGrunner provides a layer of abstraction for schedulers. This enables a range of schedulers to be selected as per requirement.

These range from dask, ray to our own in-house multiprocessing asynchronous scheduler (built upon the multiprocessing library). See command help for further details.

Logging and monitoring

DAGrunner provides a script dagrunner-logger for running a TCP server. This enables logging to function across the network. Additionally, it will write logs to an sqlite database to aid in realtime monitoring from external tools. See logger for more information.

Logo

Colour:

dagrunner_icon

B&W:

dagrunner_icon

About

Scheduler-agnostic DAG execution through decoupled graph definition and orchestration.

Topics

Resources

Contributing

Stars

5 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages