Yanked
This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.7.0 instead.
Pyturbo Package
Author: Lijun Yu
Email: lijun@lj-y.com
A pipeline system for efficient execution.
Installation
pip install py-turbo
Introduction
Pyturbo utilizes multiple level of abstract to efficiently execute parallel tasks.
- Worker: a process.
- Stage: a group of peer workers processing the same type of tasks.
- Task: a data unit transferred between stages. At each stage, a task is processed by one worker and will result in one or multiple downstream tasks.
- Pipeline: a set of sequential stages.
- Job: a data unit for a pipeline, typically a wrapped task for the first stage.
- Result: output of a job processed by one pipeline, typically a set of output tasks from the last stage.
- System: a set of peer pipelines processing the same type of jobs.
Get Started
from pyturbo import ReorderStage, Stage, System
class Stage1(Stage): # Define a stage
def __init__(self, resources):
... # Optional: set resources and number of workers
def process(self, task):
... # Process function for each worker process. Returns one or a series of downstream tasks.
... # Repeat for Stage2, Stage3
class Stage4(ReorderStage): # Define a reorder stage, typically for the final stage
def get_sequence_id(self, task):
... # Return the order of each task. Start from 0.
def process(self, task):
...
class MySystem(System):
def get_stages(self, resources):
... # Define the stages in a pipeline with given resources.
def get_results(self, results_gen):
... # Define how to extract final results from output tasks.
def main():
system = MySystem(num_pipeline)
system.start() # Build and start system
system.add_job(...) # Submit one job
finished_job = system.result_queue.get() # Wait for result
system.end() # End system
Demo
See demo.py for an example implementation.
Version History
See version.md.
Metadata
Release files for py-turbo 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| py-turbo-0.1.2.tar.gz | 7.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_turbo-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.9 kB
Release files / py-turbo-0.1.2.tar.gz
| Download URL | py-turbo-0.1.2.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d13d6b5185c0aa2e51726497734ec543bace23dccff605f80b7658d18cb46b7
|
|
BLAKE2b-256 checksum How to use checksums |
cdc291285d5e6d0a0033b6d053a2a933aeadacb04cd550a1fa9600fc73220e62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
|
Release files / py_turbo-0.1.2-py3-none-any.whl
| Download URL | py_turbo-0.1.2-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08d446fd7d2f3ad53da4d777a73daf8681555f517dec1767e06f212424af1d59
|
|
BLAKE2b-256 checksum How to use checksums |
d1339595872a4b0acb69d73c4cd67a1d2f9c0a7ba62e2f70888a74f709d8b3ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
|