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 0.0.6
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-0.0.6.tar.gz | 18.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| paneltime_mp-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.1 kB
Release files / paneltime_mp-0.0.6.tar.gz
| Download URL | paneltime_mp-0.0.6.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab3a1498afd23caf0d86d09e7fc0ffc124e546e1c3e4c146821c9c4a9a5bd2c3
|
|
BLAKE2b-256 checksum How to use checksums |
565fb3977e41faaf9a49d904614b11fa31179ef512eb6af709b394782bdfdb6c
|
| 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-0.0.6-py3-none-any.whl
| Download URL | paneltime_mp-0.0.6-py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2466fa432c07b5fc3b0cddedc2170c4c8d457ab2f7b8f441d14d001b084a5de9
|
|
BLAKE2b-256 checksum How to use checksums |
dab4d09f052d33bccec2a07fdbad0fb6eb717f49d514d709defd5b2f0efb1f37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|