Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pintel

Scale your ML workers asynchronously across processes and machines

GitHub release Test status Lint status Coverage status Docs licence

Description • Install • Usage • FAQ • Contribute
Documentation

Description

pintel is a python package that helps you scale your ML workers (or any python code) across processes and machines, asynchronously.

pintel is :

  • ⚡️ Highly performant
  • 🔀 Asynchronous
  • 🐥 Easy-to-use

Install

Install pintel by running :

pip install pintel

Usage

After defining your awesome model :

import time

class MyAwesomeModel:
    def __init__(self, wait_time=0.25):
        super().__init__()
        self.w = wait_time

    def __call__(self, x):
        time.sleep(self.w)
        return x**2

You can simply start a few workers serving the model :

from pintel import Worker

for _ in range(4):
    Worker(MyAwesomeModel).start()

And send requests through the Hub :

from pintel import Hub

hub = Hub()

# In an async function
await hub.request(34)

And that's it !


Make sure to check the documentation for a more detailed explanation.

Or you can run some examples from the examples/ folder.

FAQ

❓ How pintel works ?

pintel simply run your model code in separate processes, and send requests to the right process to ensure requests are treated in parallel.

pintel uses a modified form of the Paranoid Pirate Pattern from the zmq guide.

❓ Why the name "pintel" ?

Pintel is one of the pirates of Captain Barbossa's crew on the Black Pearl.
Since we are using the Paranoid Pirate Pattern, we needed a pirate name !

Contribute

To contribute, install the package locally, create your own branch, add your code (and tests, and documentation), and open a PR !

Pre-commit hooks

Pre-commit hooks are set to check the code added whenever you commit something.

If you never ran the hooks before, install it with :

pre-commit install

Then you can just try to commit your code. If you code does not meet the quality required by linters, it will not be committed. You can just fix your code and try to commit again !


You can manually run the pre-commit hooks with :

pre-commit run --all-files

Tests

When you contribute, you need to make sure all the unit-tests pass. You should also add tests if necessary !

You can run the tests with :

pytest

Pre-commit hooks will not run the tests, but it will automatically update the coverage badge !

Documentation

The documentation should be kept up-to-date. You can visualize the documentation locally by running :

mkdocs serve

Metadata

Release files for pintel 0.3.0.dev0

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

Source distribution (sdist)

Source distribution for pintel 0.3.0.dev0
File Size Uploaded Provenance Actions
pintel-0.3.0.dev0.tar.gz 14.7 kB Without provenance Details for pintel-0.3.0.dev0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pintel 0.3.0.dev0
File Interpreter ABI Platform Actions
pintel-0.3.0.dev0-py3-none-any.whl Python 3 none any Details for pintel-0.3.0.dev0-py3-none-any.whl

Total release size: 25.3 kB

Release files / pintel-0.3.0.dev0.tar.gz

Download URL pintel-0.3.0.dev0.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fda50a89b692238c88bcb5c5f7313a542bcaa1f42d2e96d4d6ffbb749c5d4832
BLAKE2b-256 checksum
How to use checksums
c8297b858a989368d8e272be5d00491f57a0e7bcd66769be363052526e4dbd96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pintel-0.3.0.dev0-py3-none-any.whl

Download URL pintel-0.3.0.dev0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbe3225e9f85e254486df65478f9ce6b94e53430b0f96a9b9f376cecb2cbd404
BLAKE2b-256 checksum
How to use checksums
8c199d5538fcc483637acf03aefc89c917be2c21a149c347686779e05248a7d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pintel 0.3.0.dev0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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