Jug
A Python framework for parallel reproducible computation using task-based workflows, supporting multiple backends like filesystem and Redis.
What it is
Jug is a task-based parallelization framework designed for Python developers and researchers who need to run reproducible computations across multiple processors or machines. It breaks down complex code into manageable tasks, handles dependencies automatically, and saves all intermediate results to a backend for later retrieval.
The framework supports various backends, including the filesystem for NFS-compatible coordination between machines and Redis for centralized task management. This flexibility allows users to scale their computations from a single multi-core machine to a distributed cluster effortlessly.
Jug is particularly valuable for scientific computing, data analysis, and parameter sweeps where reproducibility is crucial. It includes features like task invalidation, map-reduce patterns, and a shell for inspecting results, making it ideal for long-running experiments and iterative development.
Notable aspects include its stability since version 1.0, integration with scientific publishing through citation support, and practical examples like password decryption and text processing that demonstrate real-world applications.
This description was generated by AI from the site's public content and may contain errors.
What you can do there
- Run parallel reproducible computations
- Coordinate tasks across multiple machines
- Use filesystem or Redis backends for communication
- Inspect results with an integrated shell
- Follow worked-out examples for decryption and text processing
Who it's for
Python developers and researchers needing reproducible parallel computation
Frequently asked questions about jug.readthedocs.io
›What is Jug used for?
Jug is used for parallelizing reproducible computations in Python, breaking code into tasks that can run across multiple processors or machines.
›How does Jug handle task dependencies?
Jug automatically manages task dependencies, ensuring tasks run only when their prerequisites are completed and storing results for later use.
›What backends does Jug support?
Jug supports filesystem-based backends for NFS environments and Redis for centralized coordination, with options for other backends as well.
›Is Jug suitable for scientific research?
Yes, Jug is designed for reproducible scientific computation and includes citation guidelines for publications using its results.
›How do I get started with Jug?
Install Jug via pip or conda, then define tasks using the TaskGenerator decorator and run them with jug execute on your Python script.
›Can Jug run on multiple machines?
Yes, Jug can coordinate processes across different machines using NFS-compatible filesystems or a shared Redis server.
›Does Jug support invalidating task results?
Yes, Jug allows manual invalidation of task results, which is dependency-aware to ensure consistency across workflows.
