mpservice#
(Generated on May 18, 2024 for mpservice version 0.15.3.)
The package mpservice provides utilities for Python concurrency, including most notably
Serving with multiprocessing to make full use of multiple cores, and batching to take advantage of vectorized computation if some components of the service have that capability.
One use case is machine learning model serving, although the code is generic and not restricted to this particular use case.
A
mpservice.mpserver.Server
ormpservice.mpserver.AsyncServer
object could be used either in “embedded” mode or to back a service. Utilities are provided inmpservice.http
,mpservice.socket
, andmpservice.pipe
for the latter use case.Stream processing, i.e. processing a long, possibly infinite stream of input data, with multiple operators in the pipeline. A main use case is that one or more of the operators is I/O bound or compute intensive, hence can benefit from concurrency.
Utilities in
mpservice.multiprocessing
to enhance or customize Python’s standard multiprocessing module.
To install, do
python3 -m pip install mpservice