R-3PO -- Richard's Parallel Processing Pipeline
Introduction
A library built on top of Ray to make embarassingly parallel problems embarassingly easy.
Suppose you have lots of data files that need to be processed in the exact same way with the same function. And suppose you want to save the results of that processing into a CSV file. This is an embarassingly parallel problem: it should be embarassingly easy.
And that's what R3PO aims to deliver: R3PO lets you do it with a config.yaml
file and three lines of code.
config.yaml:
job_name: count_produce
output_path: /home/lieu/dev/r3po/sample/output_dir
processes: 2
source_file_part: .json
source_path: /home/lieu/dev/r3po/sample/produce_log
working_dir: /home/lieu/dev/r3po/sample/working_dir
main.py:
from r3po import jobbuilder, jobrunner
# Import the function that will be called by your processes
from count_fruits import count_fruits
CONFIG_YAML_FP = './config.yaml'
# Build jobs
jobbuilder.build_jobs(CONFIG_YAML_FP)
# Run jobs
jobrunner.run_jobs(CONFIG_YAML_FP, count_fruits)
This will run the function count_fruits on all the .json files
in source_path, and save the results as CSVs in output_path
(one row per JSON file).
That's it! R3PO automatically handles the distribution of tasks to processes, saves your progress so you can stop and restart the job anytime, and logs all errors automatically.
Quickstart (worked example)
[TODO] -- but check the sample directory
Installation
pip3 install r3po
Release files for r3po 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| r3po-0.2.0.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| r3po-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.2 kB
Release files / r3po-0.2.0.tar.gz
| Download URL | r3po-0.2.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49e07fe6788a268e378ebf4207e2b479039d33bf0125c9237306b4a439b3df81
|
|
BLAKE2b-256 checksum How to use checksums |
cb8fde74cafbce1f340f3f51ac8ee7dbd1f13836e05fbb95d8cdfbed18d67d1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
|
Release files / r3po-0.2.0-py3-none-any.whl
| Download URL | r3po-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df1fe5f2251ccf7d80d46b40406273d6b8bdb158969d8e6dbe2e43b817c75ea4
|
|
BLAKE2b-256 checksum How to use checksums |
8ab354c265929d9a83999e7e7687f45ee0dd51b99249218ae5fd9e5648a4d56b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
|