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 1.0.1

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 1.0.1
File Size Uploaded
paneltime_mp-1.0.1.tar.gz 18.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for paneltime-mp 1.0.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

1.0.2

2 release files

This release

1.0.1 This release

2 release files

0.0.6

2 release files

0.0.5

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