Collection of schedulers for distributed computing
Project description
Saga
Saga: Scheduling Algorithms Gathered.
Introduction
This repository contains a collection of scheduling algorithms.
The algorithms are implemented in Python using a common interface.
Scripts for validating and comparing the performance of the algorithms are also provided.
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
To install additional dependencies like pytest for running tests, run:
pip install pytest pytest-timeout
Some of the algorithms might rely on external solvers, such as Z3. To install Z3 and configure pysmt, use:
pip install pysmt
pysmt-install --z3
Docker Installation
You can also run Saga using Docker. The provided Dockerfile will handle all dependencies, including solvers and testing tools.
-
Build the Docker image:
docker build -t saga-schedulers .
-
Run the image:
docker run --rm saga-schedulers
By default, the Docker image will run the tests when started.
Running the Tests
Locally
You can run the tests using pytest. Make sure you have installed the necessary dependencies, including pytest and pytest-timeout:
pip install pytest pytest-timeout
Then, run the tests:
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"
Using Docker
When running the Docker image, the tests will run automatically. You can also pass specific pytest options when running the Docker container.
For example, to run all tests with a 120-second timeout:
docker run --rm saga-schedulers pytest --timeout=120
Or to run a specific test combination (e.g., HeftScheduler and diamond):
docker run --rm saga-schedulers pytest -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: nx.Graph = ...
task_graph: nx.DiGraph = ...
scheduler.schedule(network, task_graph)
See the examples in the examples directory for more!
Experiments from Papers
To reproduce the experiments from papers using SAGA, see the experiments directory.
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-0.0.9.tar.gz.
File metadata
- Download URL: anrg.saga-0.0.9.tar.gz
- Upload date:
- Size: 66.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a1d2c391b31b0ef3d37e55b6915bc8eaf038f406e90b67637b5e5f8a1d3abff
|
|
| MD5 |
96d4ff7614f9ef5055dfae2b27dfddfc
|
|
| BLAKE2b-256 |
70174d5dbbee4b3a2d720f28cf333a00b0f0fe49defcb5c94a17e3e9bb02cdc8
|
File details
Details for the file anrg.saga-0.0.9-py3-none-any.whl.
File metadata
- Download URL: anrg.saga-0.0.9-py3-none-any.whl
- Upload date:
- Size: 89.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0abaebfff1c6d218d5c7eefa594b5ecfb245187ee6379e01254206e3d03968e
|
|
| MD5 |
0f21647a3d61b52791bdea6b48d94589
|
|
| BLAKE2b-256 |
35461bc6098b316f74f0431f2403cdac40e07a9f53fdb5974f09930a5c33833f
|