Pantarei
A general-purpose workflow manager - because everything flows
$ rei run project.py
$ rei ls -l project.py
⬜ project.py |███████████ | 50% [2/4] 0:00:14
✅ ended 50% [2/4]
⭐ running 50% [2/4]
✅ f/185e9a70bf662355983d79881877056a 0:00:05 f(x=0)
✅ f/216ec88e5485e1ae439c37d3f94cab8f 0:00:05 f(x=1)
⭐ f/4e17f7f9fc6073c3d511bc12c7b6722a 0:00:02 f(x=2)
⭐ f/1853daf3a769344e10cfcbdef036a8c9 0:00:02 f(x=3)
Quick start
Pantarei builds on four kinds of execution units:
- functions: stateless, Python callables
- tasks: wrapped functions that cache execution results
- threads: wrapped tasks for batch execution in /shared-memory/ parallel environments
- jobs: wrapped tasks for batch execution in /distributed-memory/ parallel environments
As a catch-all, it also provides a parallel execution unit that uses whatever scheduling system is available on your environment, defaulting to shared-memory parallelism.
To see it in action, say you have a Python function
def f(x):
import time
time.sleep(2)
return x
Wrap the function with a Task and call it with a range of arguments
from pantarei import Task
task = Task(f)
for x in [1, 2]:
task(x=x)
The task's results are cached: a successive execution will just fetch the results (like joblib)
results = task(x=1)
We wrap the task with Parallel and submit its execution to a local scheduler, such as SLURM, or to a multi-threading scheduler as fallback
from pantarei import Parallel
job = Parallel(task)
for x in [3, 4]:
job(x=x)
If you want to get the jobs' results, wait until they are done
job.scheduler.wait()
results = job(x=3)
Command line interface
Pantarei comes with a command line interface to run and manage jobs. If you like working from the terminal, you'll find yourself at home.
Run a script with some jobs
rei run script.py
Check the status of the jobs
rei ls -l script.py
🟩 script.py |████████████████████| 0:00:00 [2/2]
✅ f/3de5a949fa3c880e35165fc6820ce82e 0:00:00 f(x=1)
✅ f/26766c2fda253b7aeb1adaa02f31e93b 0:00:00 f(x=2)
Inspect the jobs' cache (metadata and results)
rei cat script.py
Clear the jobs' cache and artifacts
rei rm -rf script.py
There is much more of course: rei --help and rei <command> --help are your best friends.
Documentation
Check out the tutorial for more examples and the public API for full details.
The CLI interface (rei) is documented via its own help pages.
Installation
From pypi
pip install pantarei
TODO
- submit on remote cluster
- handle task dependencies
- add Workflow / Queue
- perhaps add signac-like view() or checkout() method to check out a view of cache as folders
Contributing
Contributions to the project are welcome. If you wish to contribute, check out these guidelines.
Authors
- Daniele Coslovich
Metadata
Release files for pantarei 0.11.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pantarei-0.11.1.tar.gz | 62.0 kB | Without provenance | Details for pantarei-0.11.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pantarei-0.11.1-py3-none-any.whl | Python 3 | none | any | Details for pantarei-0.11.1-py3-none-any.whl |
Total release size: 119.3 kB
Release files / pantarei-0.11.1.tar.gz
| Download URL | pantarei-0.11.1.tar.gz |
|---|---|
| Size | 62.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9bd58cf3b054201202199b5d8c4e902595464a50dba7fcf4a512a3fa264171a
|
|
BLAKE2b-256 checksum How to use checksums |
4e91a81a8dac2e758d8f659d34654957225c26c23d3bc56fb7df4f68349a1f1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / pantarei-0.11.1-py3-none-any.whl
| Download URL | pantarei-0.11.1-py3-none-any.whl |
|---|---|
| Size | 57.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90c156fa45f20b5c7cb1bb877c64020ee6790fccb010efa56b6420a3272791cb
|
|
BLAKE2b-256 checksum How to use checksums |
297d96839b592fb71dfa04534b4e5573fa521b7e96d6b79110e0b54d199f81a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Security for pantarei 0.11.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.