Skip to main content

Scheduling Algorithms Gathered - collection of task graph scheduling algorithms

Project description

Saga

CI PyPI version Python 3.11+ License: MIT

Saga: Scheduling Algorithms Gathered.

Introduction

Saga – Scheduling Algorithms Gathered – is a Python toolkit/library for designing, comparing, and visualising DAG-based computational workflow-scheduler performance on heterogeneous compute networks (also known as dispersed computing). It ships with a collection of scheduling algorithms, including classic heuristics (HEFT, CPOP), brute-force baselines, SMT-based optimisers, and more, all under one cohesive API.

The algorithms are all implemented in Python using a common interface. Scripts for validating and comparing the performance of the algorithms are also provided.

Prerequisites

Python Version

All components of this repository have been tested with Python 3.11. To ensure compatibility and ease of environment management, we recommend using Conda.

To create a new Conda environment with Python 3.11:

conda create -n saga-env python=3.11
conda activate saga-env

For more information on managing Python versions with Conda, refer to the Conda documentation. (Managing Python — conda 25.3.0 documentation)

Graphviz Installation

To enable task graph visualization, ensure that Graphviz is installed on your system. Graphviz provides the dot command-line tool used for rendering graphs.

Installation via Conda (Recommended)

You can install Graphviz and its Python interface using Conda: (anaconda - graphviz - can't import after installation - Stack Overflow)

conda install -c conda-forge graphviz python-graphviz

This command installs both the Graphviz binaries and the python-graphviz package, facilitating seamless integration with Python scripts. (anaconda - graphviz - can't import after installation - Stack Overflow)

Manual Installation

If you prefer manual installation:

  • macOS:

    • Using Homebrew:

      brew install graphviz
      
    • Using MacPorts:

      sudo port install graphviz
      
  • Windows:

    • Download the installer from the Graphviz Download Page.

    • Run the installer and ensure the option "Add Graphviz to the system PATH for current user" is selected during installation.

  • Linux (Debian/Ubuntu-based):

Verifying the Installation

After installation, confirm that the dot command is accessible:

dot -V

This should output the version of Graphviz installed, indicating that dot is ready for use.

Usage

Installation

Local Installation

Clone the repository and install the requirements:

git clone https://github.com/ANRGUSC/saga.git
cd saga
pip install -e ./src

Running the Tests

Unit tests generate random task graphs and networks to verify scheduler correctness. They also check the RandomVariable utilities used for stochastic scheduling.

Locally

You can run the tests using pytest:

pytest ./tests

You may want to skip some of the tests that are too slow. You can do this ddirectly:

pytest ./tests -k "not (branching and (BruteForceScheduler or SMTScheduler))"

or by setting a timeout for the tests:

pytest ./tests --timeout=60

To run a specific test or scheduler-task combination, use the -k option. For example, to run the HeftScheduler tests on the diamond task graph:

pytest ./tests -k "HeftScheduler and diamond"

Running the Algorithms

The algorithms are implemented as Python modules. The following example shows how to run the HEFT algorithm on a workflow:

from saga.schedulers import HeftScheduler

scheduler = HeftScheduler()
network: Network = ...
task_graph: TaskGraph = ...
scheduler.schedule(network, task_graph)

Examples

The repository contains several example scripts illustrating different algorithms and scenarios. You can find them under scripts/examples. To run an example, use:

python scripts/examples/<example_name>/main.py

The table of contents in scripts/examples/Readme.md lists examples ranging from basic usage to dynamic networks and scheduler comparisons.

Experiments

To reproduce the experiments from papers using SAGA, see the experiments directory.

Acknowledgements

This work was supported in part by Army Research Laboratory under Cooperative Agreement W911NF-17-2-0196.

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

anrg_saga-2.0.1.tar.gz (69.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anrg_saga-2.0.1-py3-none-any.whl (90.2 kB view details)

Uploaded Python 3

File details

Details for the file anrg_saga-2.0.1.tar.gz.

File metadata

  • Download URL: anrg_saga-2.0.1.tar.gz
  • Upload date:
  • Size: 69.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for anrg_saga-2.0.1.tar.gz
Algorithm Hash digest
SHA256 b885f25bc6588a2dddf5610e2f223ab6d9559de775e560b4053561ffb50a739b
MD5 5901e9d5e72a462954efa64a628e8bcf
BLAKE2b-256 90bf4b806461c01dc4737bcfc0b4686ee9762b7f1ab7c488c3b1da9bcb1460bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for anrg_saga-2.0.1.tar.gz:

Publisher: publish.yml on ANRGUSC/saga

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anrg_saga-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: anrg_saga-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 90.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for anrg_saga-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c87180609a2f72c0e07d606862f6d2634fe596b8ca85c8d8918b7c5d6578d44
MD5 371fb6019ac46b8c62a9300e1fb62152
BLAKE2b-256 496498c8b0a923f05f142b8ee45684d258b0f7075858b3714cca2701ee1f18a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for anrg_saga-2.0.1-py3-none-any.whl:

Publisher: publish.yml on ANRGUSC/saga

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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