Skip to main content

pytest release PyPI Version PyPI - Python Version LGPL-3 License CodeFactor DeepSource

Parman

At this stage, Parman is an experimental project, so expect a rocky road ahead.

The goal of Parman is to extend concurrent.futures (and compatible implementations) with features that facilitate a transparent implementation of workflows.

  • WaitFuture: a Future subclass that is "finished" after its dependencies have finished. (To be created with WaitGraph.submit, which never blocks.)
  • ScheduledFuture: a Future subclass that submits a Future after its dependencies have finished. (To be created with Scheduler.submit, which never blocks.)
  • Various Runner classes, similar to Executors, which dispatch function calls elsewhere. The main differences with conventional executors being:
    • Closures are submitted for (remote) execution, which contain more metadata, e.g. about (keyword) arguments and return values, than ordinary functions The extra metadata offer several advantages...
    • A dry run can be carried out to quickly validate the connectivity of steps in the workflow before launching a full scale calculation.
    • Closure arguments may contain futures. If schedule=True is set, closures are scheduled for later execution when not all dependency futures have finished yet. (Dependencies are inferred from the arguments and keyword arguments.) Otherwise, the runner will block until all required futures have completed.
    • Closure return values are instantiated as much as possible, instead of just returning a single future. They may contain futures more deeply nested for parts of the return value, This makes it easier to submit more closures further down the workflow.

As a result, workflows can be implemented efficiently with relatively simple Python scripts, mostly hiding the interaction with Future objects.

Other useful features:

  • Compatible with Python's built-in Concurrent package and Parsl. (Parls is an optional dependency.)
  • Simplicity:
    • Template jobs, for a straightforward migration of existing job scripts.
    • Minimal Python package dependencies.
    • Minimal API.

Getting started

Install

python -m pip install parman

Examples

At this stage, there is no documentation as such. If you want to learn how to use Parman, check out the demos. If you want to understand the internals, read the source and the docstrings.

Non-goals

  • Support for Dask, because:
    1. The Dask Future does not subclass from concurrent.futures.Future. Supporting dask would imply a lot of extra boilerplate code in Parman.
    2. The Dask Future implements only a subset of concurrent.futures.Future.
    3. Dask Distributed has a large memory and time overhead.

Plans

  • Simplify usage.
  • Add more examples.
  • Tutorial.

Metadata

Release files for Parman 0.4.3

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

Source distribution (sdist)

Source distribution for Parman 0.4.3
File Size Uploaded
parman-0.4.3.tar.gz 85.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Parman 0.4.3
File Interpreter ABI Platform
Parman-0.4.3-py3-none-any.whl Python 3 none any Details

Total release size: 134.4 kB

Release files / parman-0.4.3.tar.gz

Download URL parman-0.4.3.tar.gz
Size 85.6 kB
Tags Source
SHA-256 checksum
How to use checksums
dd746808338be21e2856506ed7ee25b542cf73fc4c765089b58ba03a209daec6
BLAKE2b-256 checksum
How to use checksums
e64890737564a50d5e340bea9ae4fee7b232594ab8a409570b402227e7ac6bd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / Parman-0.4.3-py3-none-any.whl

Download URL Parman-0.4.3-py3-none-any.whl
Size 48.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fd0bab3d5fdebe3b96ba1b37494e886e0bc37fba24b21f8ab462f58ae6f7c82
BLAKE2b-256 checksum
How to use checksums
97efe963965b088d7972e5f6ec2bd2d6b7c90061c7265793d81932041888a366
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

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