paneltime_mp
Author: Espen Sirnes Version: 1.0.1
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.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 | |
|---|---|---|---|
| paneltime_mp-1.0.2.tar.gz | 18.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| paneltime_mp-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.3 kB
Release files / paneltime_mp-1.0.2.tar.gz
| Download URL | paneltime_mp-1.0.2.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9fe4d572c30a42bb2e481cf25e06893cbe323f826d7733cc66a3ca726c23f2c6
|
|
BLAKE2b-256 checksum How to use checksums |
892b2dbebaec4095669e7a6712d9a9e482da147f32ecd129daa086358c6dd2ec
|
| 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.2-py3-none-any.whl
| Download URL | paneltime_mp-1.0.2-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ce6a82517f8f780804bd30d735ddeee516cabfc21a4eec78fa38109ac21b946
|
|
BLAKE2b-256 checksum How to use checksums |
706ceba6d65e1ca51e54925867f98f57acbdda5c3a2b23be7d2a071ea4fcf979
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|