Skip to main content

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:

  1. Start Master(n) with one process per worker.
  2. Send one shared dictionary to all workers with send_dict(...).
  3. Put everything task strings need inside that dictionary, including functions.
  4. Run one task string per worker using run(tasks, "eval") or run(tasks, "exec").
  5. 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.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for paneltime-mp 0.0.5
File Size Uploaded
paneltime_mp-0.0.5.tar.gz 18.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for paneltime-mp 0.0.5
File Interpreter ABI Platform
paneltime_mp-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 37.1 kB

Release files / paneltime_mp-0.0.5.tar.gz

Download URL paneltime_mp-0.0.5.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
105525be8ddebe032ddb7a72e26c97b06d13156a210cc3886b3999bc967c5a1f
BLAKE2b-256 checksum
How to use checksums
3e7bd021a3abba0623b79452d2139eb4ec303400eb472b496a4291939f64030f
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.5-py3-none-any.whl

Download URL paneltime_mp-0.0.5-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e68ccb8f056e96930903ffdb4f473f62f20d386ca4be10d43b89f408dd46c02a
BLAKE2b-256 checksum
How to use checksums
654ccc8c18066bbbc4d392a0d8b884bdbbfa9a1d33ac2628471379da84c1319b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

1.0.2

2 release files

1.0.1

2 release files

0.0.6

2 release files

This release

0.0.5 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page