paneltime_mp
Author: Espen Sirnes Version: 0.0.2
Multiprocessing interface
Setup
Use the setup helper script from the project root:
python setup_script.py
This cleans old build artifacts and installs the package in editable mode (pip install -e .).
Show script help:
python setup_script.py --help
Publish workflow (version bump, git commit/push, build, upload):
python setup_script.py -p
Example Workflow
The intended flow is:
- Start
Master(n)with one process per worker. - Send one shared dictionary to all workers with
send_dict(...). - Put everything task strings need inside that dictionary, including functions.
- Run one task string per worker using
run(tasks, "eval")orrun(tasks, "exec"). - Collect outputs with
collect().
import operator
from paneltime_mp import Master
master = Master(2)
try:
payload = {
"values": [1, 2, 3],
"factor": 5,
"mul": operator.mul,
}
master.send_dict(payload)
master.collect()
tasks = [
"{'node': 0, 'scaled': [mul(v, factor + 0) for v in values]}",
"{'node': 1, 'scaled': [mul(v, factor + 1) for v in values]}",
]
master.run(tasks, "eval")
result = master.collect()
print(result)
finally:
master.quit()
Smoke Test
Run the end-to-end smoke test:
python tests/smoke_mp.py
Release files for paneltime-mp 1.0.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 | |
|---|---|---|---|
| paneltime_mp-1.0.1.tar.gz | 18.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| paneltime_mp-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.3 kB
Release files / paneltime_mp-1.0.1.tar.gz
| Download URL | paneltime_mp-1.0.1.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97f5223b552ff880e32b2c9d7fb7e86c3b2e4eac7028892859d87907657d85da
|
|
BLAKE2b-256 checksum How to use checksums |
14726377ca3c63ccce3133b294fd6ea15298c87d3678c94c40a71d02048239c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / paneltime_mp-1.0.1-py3-none-any.whl
| Download URL | paneltime_mp-1.0.1-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
304d57f3b89af97d8ca378a1bf9c8d97135348c7e09aeb926b60c92f8f1f5c74
|
|
BLAKE2b-256 checksum How to use checksums |
68e4485b969b911ade8b81f59adf4d4285fdf09244a728bc3fc6815ab768f1ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|