Scheduling Algorithms Gathered - collection of task graph scheduling algorithms
Project description
Saga
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:
-
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):
-
Install via APT: (Linux Install Graphviz Dot - friendlylasopa)
sudo apt-get update sudo apt-get install graphviz
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anrg_saga-2.0.0.tar.gz.
File metadata
- Download URL: anrg_saga-2.0.0.tar.gz
- Upload date:
- Size: 67.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e0d75b499d6a2be2a163a4e14641e7a809345dda9e7c837faf01e8fafb7e96f
|
|
| MD5 |
13ab61238a51f3a2755d964fd6f3a77c
|
|
| BLAKE2b-256 |
f69563d2526b7f6b386b154d280ae8c32b63a58a3ab96624c90f5b30d071e9bd
|
Provenance
The following attestation bundles were made for anrg_saga-2.0.0.tar.gz:
Publisher:
publish.yml on ANRGUSC/saga
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anrg_saga-2.0.0.tar.gz -
Subject digest:
2e0d75b499d6a2be2a163a4e14641e7a809345dda9e7c837faf01e8fafb7e96f - Sigstore transparency entry: 771684807
- Sigstore integration time:
-
Permalink:
ANRGUSC/saga@9e1aa36f8d29d7f2cea8c122cada4d06b133cfa9 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/ANRGUSC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9e1aa36f8d29d7f2cea8c122cada4d06b133cfa9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file anrg_saga-2.0.0-py3-none-any.whl.
File metadata
- Download URL: anrg_saga-2.0.0-py3-none-any.whl
- Upload date:
- Size: 88.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d45b56e37847d29db089956d017a2a9e6e6b798bc96f38ea4bc08e7a0017d34b
|
|
| MD5 |
296ef574145ce98f418aee8146f422b7
|
|
| BLAKE2b-256 |
0e56ba2fde1aa52683cc9592a6286556763e776a3a3403e8cfa35885e7ea18e2
|
Provenance
The following attestation bundles were made for anrg_saga-2.0.0-py3-none-any.whl:
Publisher:
publish.yml on ANRGUSC/saga
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anrg_saga-2.0.0-py3-none-any.whl -
Subject digest:
d45b56e37847d29db089956d017a2a9e6e6b798bc96f38ea4bc08e7a0017d34b - Sigstore transparency entry: 771684813
- Sigstore integration time:
-
Permalink:
ANRGUSC/saga@9e1aa36f8d29d7f2cea8c122cada4d06b133cfa9 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/ANRGUSC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9e1aa36f8d29d7f2cea8c122cada4d06b133cfa9 -
Trigger Event:
release
-
Statement type: