Skip to main content

A Python package for easy multiprocessing, but faster than multiprocessing

Project description

![Build](https://github.com/Slimmer-AI/mpire/workflows/Python%20package/badge.svg?branch=master)

MPIRE (MultiProcessing: Insanely Rapid Execution)

A Python package for multiprocessing, but faster than multiprocessing. It combines the convenient map like functions of multiprocessing.Pool with the benefits of using copy-on-write shared objects of multiprocessing.Process.

Features

  • Multiprocessing with map/map_unordered/imap/imap_unordered functions

  • Easy use of copy-on-write shared objects with a pool of workers

  • Each worker can have its own state (e.g., to load a memory-intensive model only once for each worker without the need of sending it through a queue)

  • Automatic task chunking for all available map functions to speed up processing of small task queues (including numpy arrays)

  • Adjustable maximum number of active tasks to avoid memory problems

  • Automatic restarting of workers after a specified number of tasks to reduce memory footprint

  • Nested pool of workers are allowed when setting the daemon option

  • Child processes can be pinned to specific or a range of CPUs on Linux systems

  • Multiple process start methods available, including: fork (default), forkserver, spawn, and threading

  • Progress bar support using [tqdm](https://tqdm.github.io/)

  • Progress dashboard support

  • (Optional) [dill](https://pypi.org/project/dill/) support

Installation

Through pip (PyPi):

` pip install mpire `

From source:

` python setup.py install `

Documentation

If you want to build the documentation, please install the documentation dependencies by executing:

` pip install mpire[docs] `

or

` pip install .[docs] `

Documentation can then be build by executing:

` python setup.py build_docs `

Documentation can also be build from the docs folder directly. In that case MPIRE should be installed and available in your current working environment. Then execute:

` make html `

in the docs folder.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpire-1.1.3.tar.gz (236.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpire-1.1.3-py3-none-any.whl (240.8 kB view details)

Uploaded Python 3

File details

Details for the file mpire-1.1.3.tar.gz.

File metadata

  • Download URL: mpire-1.1.3.tar.gz
  • Upload date:
  • Size: 236.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for mpire-1.1.3.tar.gz
Algorithm Hash digest
SHA256 0e93013bee31a75d63c5c2cc202f12c77a721fbb9ab783c1df9c6f9dbdb8b49f
MD5 09a3f451a7f231a6a1d379b9576dc643
BLAKE2b-256 4567926d80ea1360ec9854e287329833d57c09c53f87a8d03aa19f3673077499

See more details on using hashes here.

File details

Details for the file mpire-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: mpire-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 240.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for mpire-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 366dc630255a62b54841e6ddbb4cb40a26ecbf78b4cf34f156a6be2c0ac2b928
MD5 35357f3bf7664db8f68e971a03996399
BLAKE2b-256 f475cf2f5efd33f5f02b55f2e9bef6da9bee384ff1cb900fded1a39bd92c8d11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page