mosec


Namemosec JSON
Version 0.8.4 PyPI version JSON
download
home_pagehttps://github.com/mosecorg/mosec
SummaryModel Serving made Efficient in the Cloud
upload_time2024-02-27 08:13:21
maintainer
docs_urlNone
authorKeming Yang
requires_python>=3.8
licenseApache-2.0
keywords machine learning deep learning model serving
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <img src="https://user-images.githubusercontent.com/38581401/240117836-f06199ba-c80d-413a-9cb4-5adc76316bda.png" height="230" alt="MOSEC" />
</p>

<p align="center">
  <a href="https://discord.gg/Jq5vxuH69W">
    <img alt="discord invitation link" src="https://dcbadge.vercel.app/api/server/Jq5vxuH69W?style=flat">
  </a>
  <a href="https://pypi.org/project/mosec/">
    <img src="https://badge.fury.io/py/mosec.svg" alt="PyPI version" height="20">
  </a>
  <a href="https://anaconda.org/conda-forge/mosec">
    <img src="https://anaconda.org/conda-forge/mosec/badges/version.svg" alt="conda-forge">
  </a>
  <a href="https://pypi.org/project/mosec">
    <img src="https://img.shields.io/pypi/pyversions/mosec" alt="Python Version" />
  </a>
  <a href="https://pepy.tech/project/mosec">
    <img src="https://static.pepy.tech/badge/mosec/month" alt="PyPi monthly Downloads" height="20">
  </a>
  <a href="https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)">
    <img src="https://img.shields.io/github/license/mosecorg/mosec" alt="License" height="20">
  </a>
  <a href="https://github.com/mosecorg/mosec/actions/workflows/check.yml?query=workflow%3A%22lint+and+test%22+branch%3Amain">
    <img src="https://github.com/mosecorg/mosec/actions/workflows/check.yml/badge.svg?branch=main" alt="Check status" height="20">
  </a>
</p>

<p align="center">
  <i>Model Serving made Efficient in the Cloud.</i>
</p>

## Introduction

<p align="center">
  <img src="https://user-images.githubusercontent.com/38581401/234162688-efd74e46-4063-4624-ac32-b197e4d8e56b.png" height="230" alt="MOSEC" />
</p>

Mosec is a high-performance and flexible model serving framework for building ML model-enabled backend and microservices. It bridges the gap between any machine learning models you just trained and the efficient online service API.

- **Highly performant**: web layer and task coordination built with Rust 🦀, which offers blazing speed in addition to efficient CPU utilization powered by async I/O
- **Ease of use**: user interface purely in Python 🐍, by which users can serve their models in an ML framework-agnostic manner using the same code as they do for offline testing
- **Dynamic batching**: aggregate requests from different users for batched inference and distribute results back
- **Pipelined stages**: spawn multiple processes for pipelined stages to handle CPU/GPU/IO mixed workloads
- **Cloud friendly**: designed to run in the cloud, with the model warmup, graceful shutdown, and Prometheus monitoring metrics, easily managed by Kubernetes or any container orchestration systems
- **Do one thing well**: focus on the online serving part, users can pay attention to the model optimization and business logic

## Installation

Mosec requires Python 3.7 or above. Install the latest [PyPI package](https://pypi.org/project/mosec/) for Linux x86_64 or macOS x86_64 with:

```shell
pip install -U mosec
# or install with conda
conda install conda-forge::mosec
```

To build from the source code, install [Rust](https://www.rust-lang.org/) and run the following command:

```shell
make package
```

You will get a mosec wheel file in the `dist` folder.

## Usage

We demonstrate how Mosec can help you easily host a pre-trained stable diffusion model as a service. You need to install [diffusers](https://github.com/huggingface/diffusers) and [transformers](https://github.com/huggingface/transformers) as prerequisites:

```shell
pip install --upgrade diffusers[torch] transformers
```

### Write the server

<details>
<summary>Click me for server codes with explanations.</summary>

Firstly, we import the libraries and set up a basic logger to better observe what happens.

```python
from io import BytesIO
from typing import List

import torch  # type: ignore
from diffusers import StableDiffusionPipeline  # type: ignore

from mosec import Server, Worker, get_logger
from mosec.mixin import MsgpackMixin

logger = get_logger()
```

Then, we **build an API** for clients to query a text prompt and obtain an image based on the [stable-diffusion-v1-5 model](https://huggingface.co/runwayml/stable-diffusion-v1-5) in just 3 steps.

1) Define your service as a class which inherits `mosec.Worker`. Here we also inherit `MsgpackMixin` to employ the [msgpack](https://msgpack.org/index.html) serialization format<sup>(a)</sup></a>.

2) Inside the `__init__` method, initialize your model and put it onto the corresponding device. Optionally you can assign `self.example` with some data to warm up<sup>(b)</sup></a> the model. Note that the data should be compatible with your handler's input format, which we detail next.

3) Override the `forward` method to write your service handler<sup>(c)</sup></a>, with the signature `forward(self, data: Any | List[Any]) -> Any | List[Any]`. Receiving/returning a single item or a tuple depends on whether [dynamic batching](#configuration)<sup>(d)</sup></a> is configured.


```python
class StableDiffusion(MsgpackMixin, Worker):
    def __init__(self):
        self.pipe = StableDiffusionPipeline.from_pretrained(
            "runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16
        )
        device = "cuda" if torch.cuda.is_available() else "cpu"
        self.pipe = self.pipe.to(device)
        self.example = ["useless example prompt"] * 4  # warmup (batch_size=4)

    def forward(self, data: List[str]) -> List[memoryview]:
        logger.debug("generate images for %s", data)
        res = self.pipe(data)
        logger.debug("NSFW: %s", res[1])
        images = []
        for img in res[0]:
            dummy_file = BytesIO()
            img.save(dummy_file, format="JPEG")
            images.append(dummy_file.getbuffer())
        return images
```

> [!NOTE]
>
> (a) In this example we return an image in the binary format, which JSON does not support (unless encoded with base64 that makes the payload larger). Hence, msgpack suits our need better. If we do not inherit `MsgpackMixin`, JSON will be used by default. In other words, the protocol of the service request/response can be either msgpack, JSON, or any other format (check our [mixins](https://mosecorg.github.io/mosec/reference/interface.html#module-mosec.mixin)).
>
> (b) Warm-up usually helps to allocate GPU memory in advance. If the warm-up example is specified, the service will only be ready after the example is forwarded through the handler. However, if no example is given, the first request's latency is expected to be longer. The `example` should be set as a single item or a tuple depending on what `forward` expects to receive. Moreover, in the case where you want to warm up with multiple different examples, you may set `multi_examples` (demo [here](https://mosecorg.github.io/mosec/examples/jax.html)).
>
> (c) This example shows a single-stage service, where the `StableDiffusion` worker directly takes in client's prompt request and responds the image. Thus the `forward` can be considered as a complete service handler. However, we can also design a multi-stage service with workers doing different jobs (e.g., downloading images, model inference, post-processing) in a pipeline. In this case, the whole pipeline is considered as the service handler, with the first worker taking in the request and the last worker sending out the response. The data flow between workers is done by inter-process communication.
>
> (d) Since dynamic batching is enabled in this example, the `forward` method will wishfully receive a _list_ of string, e.g., `['a cute cat playing with a red ball', 'a man sitting in front of a computer', ...]`, aggregated from different clients for _batch inference_, improving the system throughput.

Finally, we append the worker to the server to construct a *single-stage* workflow (multiple stages can be [pipelined](https://en.wikipedia.org/wiki/Pipeline_(computing)) to further boost the throughput, see [this example](https://mosecorg.github.io/mosec/examples/pytorch.html#computer-vision)), and specify the number of processes we want it to run in parallel (`num=1`), and the maximum batch size (`max_batch_size=4`, the maximum number of requests dynamic batching will accumulate before timeout; timeout is defined with the `max_wait_time=10` in milliseconds, meaning the longest time Mosec waits until sending the batch to the Worker).

```python
if __name__ == "__main__":
    server = Server()
    # 1) `num` specifies the number of processes that will be spawned to run in parallel.
    # 2) By configuring the `max_batch_size` with the value > 1, the input data in your
    # `forward` function will be a list (batch); otherwise, it's a single item.
    server.append_worker(StableDiffusion, num=1, max_batch_size=4, max_wait_time=10)
    server.run()
```
</details>

### Run the server

<details>
<summary>Click me to see how to run and query the server.</summary>

The above snippets are merged in our example file. You may directly run at the project root level. We first have a look at the _command line arguments_ (explanations [here](https://mosecorg.github.io/mosec/reference/arguments.html)):

```shell
python examples/stable_diffusion/server.py --help
```

Then let's start the server with debug logs:

```shell
python examples/stable_diffusion/server.py --log-level debug --timeout 30000
```

Open `http://127.0.0.1:8000/openapi/swagger/` in your browser to get the OpenAPI doc.

And in another terminal, test it:

```shell
python examples/stable_diffusion/client.py --prompt "a cute cat playing with a red ball" --output cat.jpg --port 8000
```

You will get an image named "cat.jpg" in the current directory.

You can check the metrics:

```shell
curl http://127.0.0.1:8000/metrics
```

That's it! You have just hosted your **_stable-diffusion model_** as a service! 😉
</details>

## Examples

More ready-to-use examples can be found in the [Example](https://mosecorg.github.io/mosec/examples/index.html) section. It includes:

- [Pipeline](https://mosecorg.github.io/mosec/examples/echo.html): a simple echo demo even without any ML model.
- [Request validation](https://mosecorg.github.io/mosec/examples/validate.html): validate the request with type annotation.
- [Multiple route](https://mosecorg.github.io/mosec/examples/multi_route.html): serve multiple models in one service
- [Embedding service](https://mosecorg.github.io/mosec/examples/embedding.html): OpenAI compatible embedding service
- [Reranking service](https://mosecorg.github.io/mosec/examples/rerank.html): rerank a list of passages based on a query
- [Shared memory IPC](https://mosecorg.github.io/mosec/examples/ipc.html): inter-process communication with shared memory.
- [Customized GPU allocation](https://mosecorg.github.io/mosec/examples/env.html): deploy multiple replicas, each using different GPUs.
- [Customized metrics](https://mosecorg.github.io/mosec/examples/metric.html): record your own metrics for monitoring.
- [Jax jitted inference](https://mosecorg.github.io/mosec/examples/jax.html): just-in-time compilation speeds up the inference.
- PyTorch deep learning models:
  - [sentiment analysis](https://mosecorg.github.io/mosec/examples/pytorch.html#natural-language-processing): infer the sentiment of a sentence.
  - [image recognition](https://mosecorg.github.io/mosec/examples/pytorch.html#computer-vision): categorize a given image.
  - [stable diffusion](https://mosecorg.github.io/mosec/examples/stable_diffusion.html): generate images based on texts, with msgpack serialization.

## Configuration

- Dynamic batching
  - `max_batch_size` and `max_wait_time (millisecond)` are configured when you call `append_worker`.
  - Make sure inference with the `max_batch_size` value won't cause the out-of-memory in GPU.
  - Normally, `max_wait_time` should be less than the batch inference time.
  - If enabled, it will collect a batch either when the number of accumulated requests reaches `max_batch_size` or when `max_wait_time` has elapsed. The service will benefit from this feature when the traffic is high.
- Check the [arguments doc](https://mosecorg.github.io/mosec/reference/arguments.html) for other configurations.

## Deployment

- If you're looking for a GPU base image with `mosec` installed, you can check the official image [`mosecorg/mosec`](https://hub.docker.com/r/mosecorg/mosec). For the complex use case, check out [envd](https://github.com/tensorchord/envd).
- This service doesn't need Gunicorn or NGINX, but you can certainly use the ingress controller when necessary.
- This service should be the PID 1 process in the container since it controls multiple processes. If you need to run multiple processes in one container, you will need a supervisor. You may choose [Supervisor](https://github.com/Supervisor/supervisor) or [Horust](https://github.com/FedericoPonzi/Horust).
- Remember to collect the **metrics**.
  - `mosec_service_batch_size_bucket` shows the batch size distribution.
  - `mosec_service_batch_duration_second_bucket` shows the duration of dynamic batching for each connection in each stage (starts from receiving the first task).
  - `mosec_service_process_duration_second_bucket` shows the duration of processing for each connection in each stage (including the IPC time but excluding the `mosec_service_batch_duration_second_bucket`).
  - `mosec_service_remaining_task` shows the number of currently processing tasks.
  - `mosec_service_throughput` shows the service throughput.
- Stop the service with `SIGINT` (`CTRL+C`) or `SIGTERM` (`kill {PID}`) since it has the graceful shutdown logic.

## Performance tuning

- Find out the best `max_batch_size` and `max_wait_time` for your inference service. The metrics will show the histograms of the real batch size and batch duration. Those are the key information to adjust these two parameters.
- Try to split the whole inference process into separate CPU and GPU stages (ref [DistilBERT](https://mosecorg.github.io/mosec/examples/pytorch.html#natural-language-processing)). Different stages will be run in a [data pipeline](https://en.wikipedia.org/wiki/Pipeline_(software)), which will keep the GPU busy.
- You can also adjust the number of workers in each stage. For example, if your pipeline consists of a CPU stage for preprocessing and a GPU stage for model inference, increasing the number of CPU-stage workers can help to produce more data to be batched for model inference at the GPU stage; increasing the GPU-stage workers can fully utilize the GPU memory and computation power. Both ways may contribute to higher GPU utilization, which consequently results in higher service throughput.
- For multi-stage services, note that the data passing through different stages will be serialized/deserialized by the `serialize_ipc/deserialize_ipc` methods, so extremely large data might make the whole pipeline slow. The serialized data is passed to the next stage through rust by default, you could enable shared memory to potentially reduce the latency (ref [RedisShmIPCMixin](https://mosecorg.github.io/mosec/examples/ipc.html#redis-shm-ipc-py)).
- You should choose appropriate `serialize/deserialize` methods, which are used to decode the user request and encode the response. By default, both are using JSON. However, images and embeddings are not well supported by JSON. You can choose msgpack which is faster and binary compatible (ref [Stable Diffusion](https://mosecorg.github.io/mosec/examples/stable_diffusion.html)).
- Configure the threads for OpenBLAS or MKL. It might not be able to choose the most suitable CPUs used by the current Python process. You can configure it for each worker by using the [env](https://mosecorg.github.io/mosec/reference/interface.html#mosec.server.Server.append_worker) (ref [custom GPU allocation](https://mosecorg.github.io/mosec/examples/env.html)).

## Adopters

Here are some of the companies and individual users that are using Mosec:

- [Modelz](https://modelz.ai): Serverless platform for ML inference.
- [MOSS](https://github.com/OpenLMLab/MOSS/blob/main/README_en.md): An open sourced conversational language model like ChatGPT.
- [TencentCloud](https://www.tencentcloud.com/document/product/1141/45261): Tencent Cloud Machine Learning Platform, using Mosec as the [core inference server framework](https://cloud.tencent.com/document/product/851/74148).
- [TensorChord](https://github.com/tensorchord): Cloud native AI infrastructure company.

## Citation

If you find this software useful for your research, please consider citing

```
@software{yang2021mosec,
  title = {{MOSEC: Model Serving made Efficient in the Cloud}},
  author = {Yang, Keming and Liu, Zichen and Cheng, Philip},
  url = {https://github.com/mosecorg/mosec},
  year = {2021}
}
```

## Contributing

We welcome any kind of contribution. Please give us feedback by [raising issues](https://github.com/mosecorg/mosec/issues/new/choose) or discussing on [Discord](https://discord.gg/Jq5vxuH69W). You could also directly [contribute](https://mosecorg.github.io/mosec/development/contributing.html) your code and pull request!

To start develop, you can use [envd](https://github.com/tensorchord/envd) to create an isolated and clean Python & Rust environment. Check the [envd-docs](https://envd.tensorchord.ai/) or [build.envd](https://github.com/mosecorg/mosec/blob/main/build.envd) for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mosecorg/mosec",
    "name": "mosec",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "machine learning,deep learning,model serving",
    "author": "Keming Yang",
    "author_email": "Keming <kemingy94@gmail.com>, Zichen <lkevinzc@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/2c/7e/6db61336580d347ec3bdf9be56e3a6e239b824d4b7f98f8ec39679b2e564/mosec-0.8.4.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/38581401/240117836-f06199ba-c80d-413a-9cb4-5adc76316bda.png\" height=\"230\" alt=\"MOSEC\" />\n</p>\n\n<p align=\"center\">\n  <a href=\"https://discord.gg/Jq5vxuH69W\">\n    <img alt=\"discord invitation link\" src=\"https://dcbadge.vercel.app/api/server/Jq5vxuH69W?style=flat\">\n  </a>\n  <a href=\"https://pypi.org/project/mosec/\">\n    <img src=\"https://badge.fury.io/py/mosec.svg\" alt=\"PyPI version\" height=\"20\">\n  </a>\n  <a href=\"https://anaconda.org/conda-forge/mosec\">\n    <img src=\"https://anaconda.org/conda-forge/mosec/badges/version.svg\" alt=\"conda-forge\">\n  </a>\n  <a href=\"https://pypi.org/project/mosec\">\n    <img src=\"https://img.shields.io/pypi/pyversions/mosec\" alt=\"Python Version\" />\n  </a>\n  <a href=\"https://pepy.tech/project/mosec\">\n    <img src=\"https://static.pepy.tech/badge/mosec/month\" alt=\"PyPi monthly Downloads\" height=\"20\">\n  </a>\n  <a href=\"https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)\">\n    <img src=\"https://img.shields.io/github/license/mosecorg/mosec\" alt=\"License\" height=\"20\">\n  </a>\n  <a href=\"https://github.com/mosecorg/mosec/actions/workflows/check.yml?query=workflow%3A%22lint+and+test%22+branch%3Amain\">\n    <img src=\"https://github.com/mosecorg/mosec/actions/workflows/check.yml/badge.svg?branch=main\" alt=\"Check status\" height=\"20\">\n  </a>\n</p>\n\n<p align=\"center\">\n  <i>Model Serving made Efficient in the Cloud.</i>\n</p>\n\n## Introduction\n\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/38581401/234162688-efd74e46-4063-4624-ac32-b197e4d8e56b.png\" height=\"230\" alt=\"MOSEC\" />\n</p>\n\nMosec is a high-performance and flexible model serving framework for building ML model-enabled backend and microservices. It bridges the gap between any machine learning models you just trained and the efficient online service API.\n\n- **Highly performant**: web layer and task coordination built with Rust \ud83e\udd80, which offers blazing speed in addition to efficient CPU utilization powered by async I/O\n- **Ease of use**: user interface purely in Python \ud83d\udc0d, by which users can serve their models in an ML framework-agnostic manner using the same code as they do for offline testing\n- **Dynamic batching**: aggregate requests from different users for batched inference and distribute results back\n- **Pipelined stages**: spawn multiple processes for pipelined stages to handle CPU/GPU/IO mixed workloads\n- **Cloud friendly**: designed to run in the cloud, with the model warmup, graceful shutdown, and Prometheus monitoring metrics, easily managed by Kubernetes or any container orchestration systems\n- **Do one thing well**: focus on the online serving part, users can pay attention to the model optimization and business logic\n\n## Installation\n\nMosec requires Python 3.7 or above. Install the latest [PyPI package](https://pypi.org/project/mosec/) for Linux x86_64 or macOS x86_64 with:\n\n```shell\npip install -U mosec\n# or install with conda\nconda install conda-forge::mosec\n```\n\nTo build from the source code, install [Rust](https://www.rust-lang.org/) and run the following command:\n\n```shell\nmake package\n```\n\nYou will get a mosec wheel file in the `dist` folder.\n\n## Usage\n\nWe demonstrate how Mosec can help you easily host a pre-trained stable diffusion model as a service. You need to install [diffusers](https://github.com/huggingface/diffusers) and [transformers](https://github.com/huggingface/transformers) as prerequisites:\n\n```shell\npip install --upgrade diffusers[torch] transformers\n```\n\n### Write the server\n\n<details>\n<summary>Click me for server codes with explanations.</summary>\n\nFirstly, we import the libraries and set up a basic logger to better observe what happens.\n\n```python\nfrom io import BytesIO\nfrom typing import List\n\nimport torch  # type: ignore\nfrom diffusers import StableDiffusionPipeline  # type: ignore\n\nfrom mosec import Server, Worker, get_logger\nfrom mosec.mixin import MsgpackMixin\n\nlogger = get_logger()\n```\n\nThen, we **build an API** for clients to query a text prompt and obtain an image based on the [stable-diffusion-v1-5 model](https://huggingface.co/runwayml/stable-diffusion-v1-5) in just 3 steps.\n\n1) Define your service as a class which inherits `mosec.Worker`. Here we also inherit `MsgpackMixin` to employ the [msgpack](https://msgpack.org/index.html) serialization format<sup>(a)</sup></a>.\n\n2) Inside the `__init__` method, initialize your model and put it onto the corresponding device. Optionally you can assign `self.example` with some data to warm up<sup>(b)</sup></a> the model. Note that the data should be compatible with your handler's input format, which we detail next.\n\n3) Override the `forward` method to write your service handler<sup>(c)</sup></a>, with the signature `forward(self, data: Any | List[Any]) -> Any | List[Any]`. Receiving/returning a single item or a tuple depends on whether [dynamic batching](#configuration)<sup>(d)</sup></a> is configured.\n\n\n```python\nclass StableDiffusion(MsgpackMixin, Worker):\n    def __init__(self):\n        self.pipe = StableDiffusionPipeline.from_pretrained(\n            \"runwayml/stable-diffusion-v1-5\", torch_dtype=torch.float16\n        )\n        device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n        self.pipe = self.pipe.to(device)\n        self.example = [\"useless example prompt\"] * 4  # warmup (batch_size=4)\n\n    def forward(self, data: List[str]) -> List[memoryview]:\n        logger.debug(\"generate images for %s\", data)\n        res = self.pipe(data)\n        logger.debug(\"NSFW: %s\", res[1])\n        images = []\n        for img in res[0]:\n            dummy_file = BytesIO()\n            img.save(dummy_file, format=\"JPEG\")\n            images.append(dummy_file.getbuffer())\n        return images\n```\n\n> [!NOTE]\n>\n> (a) In this example we return an image in the binary format, which JSON does not support (unless encoded with base64 that makes the payload larger). Hence, msgpack suits our need better. If we do not inherit `MsgpackMixin`, JSON will be used by default. In other words, the protocol of the service request/response can be either msgpack, JSON, or any other format (check our [mixins](https://mosecorg.github.io/mosec/reference/interface.html#module-mosec.mixin)).\n>\n> (b) Warm-up usually helps to allocate GPU memory in advance. If the warm-up example is specified, the service will only be ready after the example is forwarded through the handler. However, if no example is given, the first request's latency is expected to be longer. The `example` should be set as a single item or a tuple depending on what `forward` expects to receive. Moreover, in the case where you want to warm up with multiple different examples, you may set `multi_examples` (demo [here](https://mosecorg.github.io/mosec/examples/jax.html)).\n>\n> (c) This example shows a single-stage service, where the `StableDiffusion` worker directly takes in client's prompt request and responds the image. Thus the `forward` can be considered as a complete service handler. However, we can also design a multi-stage service with workers doing different jobs (e.g., downloading images, model inference, post-processing) in a pipeline. In this case, the whole pipeline is considered as the service handler, with the first worker taking in the request and the last worker sending out the response. The data flow between workers is done by inter-process communication.\n>\n> (d) Since dynamic batching is enabled in this example, the `forward` method will wishfully receive a _list_ of string, e.g., `['a cute cat playing with a red ball', 'a man sitting in front of a computer', ...]`, aggregated from different clients for _batch inference_, improving the system throughput.\n\nFinally, we append the worker to the server to construct a *single-stage* workflow (multiple stages can be [pipelined](https://en.wikipedia.org/wiki/Pipeline_(computing)) to further boost the throughput, see [this example](https://mosecorg.github.io/mosec/examples/pytorch.html#computer-vision)), and specify the number of processes we want it to run in parallel (`num=1`), and the maximum batch size (`max_batch_size=4`, the maximum number of requests dynamic batching will accumulate before timeout; timeout is defined with the `max_wait_time=10` in milliseconds, meaning the longest time Mosec waits until sending the batch to the Worker).\n\n```python\nif __name__ == \"__main__\":\n    server = Server()\n    # 1) `num` specifies the number of processes that will be spawned to run in parallel.\n    # 2) By configuring the `max_batch_size` with the value > 1, the input data in your\n    # `forward` function will be a list (batch); otherwise, it's a single item.\n    server.append_worker(StableDiffusion, num=1, max_batch_size=4, max_wait_time=10)\n    server.run()\n```\n</details>\n\n### Run the server\n\n<details>\n<summary>Click me to see how to run and query the server.</summary>\n\nThe above snippets are merged in our example file. You may directly run at the project root level. We first have a look at the _command line arguments_ (explanations [here](https://mosecorg.github.io/mosec/reference/arguments.html)):\n\n```shell\npython examples/stable_diffusion/server.py --help\n```\n\nThen let's start the server with debug logs:\n\n```shell\npython examples/stable_diffusion/server.py --log-level debug --timeout 30000\n```\n\nOpen `http://127.0.0.1:8000/openapi/swagger/` in your browser to get the OpenAPI doc.\n\nAnd in another terminal, test it:\n\n```shell\npython examples/stable_diffusion/client.py --prompt \"a cute cat playing with a red ball\" --output cat.jpg --port 8000\n```\n\nYou will get an image named \"cat.jpg\" in the current directory.\n\nYou can check the metrics:\n\n```shell\ncurl http://127.0.0.1:8000/metrics\n```\n\nThat's it! You have just hosted your **_stable-diffusion model_** as a service! \ud83d\ude09\n</details>\n\n## Examples\n\nMore ready-to-use examples can be found in the [Example](https://mosecorg.github.io/mosec/examples/index.html) section. It includes:\n\n- [Pipeline](https://mosecorg.github.io/mosec/examples/echo.html): a simple echo demo even without any ML model.\n- [Request validation](https://mosecorg.github.io/mosec/examples/validate.html): validate the request with type annotation.\n- [Multiple route](https://mosecorg.github.io/mosec/examples/multi_route.html): serve multiple models in one service\n- [Embedding service](https://mosecorg.github.io/mosec/examples/embedding.html): OpenAI compatible embedding service\n- [Reranking service](https://mosecorg.github.io/mosec/examples/rerank.html): rerank a list of passages based on a query\n- [Shared memory IPC](https://mosecorg.github.io/mosec/examples/ipc.html): inter-process communication with shared memory.\n- [Customized GPU allocation](https://mosecorg.github.io/mosec/examples/env.html): deploy multiple replicas, each using different GPUs.\n- [Customized metrics](https://mosecorg.github.io/mosec/examples/metric.html): record your own metrics for monitoring.\n- [Jax jitted inference](https://mosecorg.github.io/mosec/examples/jax.html): just-in-time compilation speeds up the inference.\n- PyTorch deep learning models:\n  - [sentiment analysis](https://mosecorg.github.io/mosec/examples/pytorch.html#natural-language-processing): infer the sentiment of a sentence.\n  - [image recognition](https://mosecorg.github.io/mosec/examples/pytorch.html#computer-vision): categorize a given image.\n  - [stable diffusion](https://mosecorg.github.io/mosec/examples/stable_diffusion.html): generate images based on texts, with msgpack serialization.\n\n## Configuration\n\n- Dynamic batching\n  - `max_batch_size` and `max_wait_time (millisecond)` are configured when you call `append_worker`.\n  - Make sure inference with the `max_batch_size` value won't cause the out-of-memory in GPU.\n  - Normally, `max_wait_time` should be less than the batch inference time.\n  - If enabled, it will collect a batch either when the number of accumulated requests reaches `max_batch_size` or when `max_wait_time` has elapsed. The service will benefit from this feature when the traffic is high.\n- Check the [arguments doc](https://mosecorg.github.io/mosec/reference/arguments.html) for other configurations.\n\n## Deployment\n\n- If you're looking for a GPU base image with `mosec` installed, you can check the official image [`mosecorg/mosec`](https://hub.docker.com/r/mosecorg/mosec). For the complex use case, check out [envd](https://github.com/tensorchord/envd).\n- This service doesn't need Gunicorn or NGINX, but you can certainly use the ingress controller when necessary.\n- This service should be the PID 1 process in the container since it controls multiple processes. If you need to run multiple processes in one container, you will need a supervisor. You may choose [Supervisor](https://github.com/Supervisor/supervisor) or [Horust](https://github.com/FedericoPonzi/Horust).\n- Remember to collect the **metrics**.\n  - `mosec_service_batch_size_bucket` shows the batch size distribution.\n  - `mosec_service_batch_duration_second_bucket` shows the duration of dynamic batching for each connection in each stage (starts from receiving the first task).\n  - `mosec_service_process_duration_second_bucket` shows the duration of processing for each connection in each stage (including the IPC time but excluding the `mosec_service_batch_duration_second_bucket`).\n  - `mosec_service_remaining_task` shows the number of currently processing tasks.\n  - `mosec_service_throughput` shows the service throughput.\n- Stop the service with `SIGINT` (`CTRL+C`) or `SIGTERM` (`kill {PID}`) since it has the graceful shutdown logic.\n\n## Performance tuning\n\n- Find out the best `max_batch_size` and `max_wait_time` for your inference service. The metrics will show the histograms of the real batch size and batch duration. Those are the key information to adjust these two parameters.\n- Try to split the whole inference process into separate CPU and GPU stages (ref [DistilBERT](https://mosecorg.github.io/mosec/examples/pytorch.html#natural-language-processing)). Different stages will be run in a [data pipeline](https://en.wikipedia.org/wiki/Pipeline_(software)), which will keep the GPU busy.\n- You can also adjust the number of workers in each stage. For example, if your pipeline consists of a CPU stage for preprocessing and a GPU stage for model inference, increasing the number of CPU-stage workers can help to produce more data to be batched for model inference at the GPU stage; increasing the GPU-stage workers can fully utilize the GPU memory and computation power. Both ways may contribute to higher GPU utilization, which consequently results in higher service throughput.\n- For multi-stage services, note that the data passing through different stages will be serialized/deserialized by the `serialize_ipc/deserialize_ipc` methods, so extremely large data might make the whole pipeline slow. The serialized data is passed to the next stage through rust by default, you could enable shared memory to potentially reduce the latency (ref [RedisShmIPCMixin](https://mosecorg.github.io/mosec/examples/ipc.html#redis-shm-ipc-py)).\n- You should choose appropriate `serialize/deserialize` methods, which are used to decode the user request and encode the response. By default, both are using JSON. However, images and embeddings are not well supported by JSON. You can choose msgpack which is faster and binary compatible (ref [Stable Diffusion](https://mosecorg.github.io/mosec/examples/stable_diffusion.html)).\n- Configure the threads for OpenBLAS or MKL. It might not be able to choose the most suitable CPUs used by the current Python process. You can configure it for each worker by using the [env](https://mosecorg.github.io/mosec/reference/interface.html#mosec.server.Server.append_worker) (ref [custom GPU allocation](https://mosecorg.github.io/mosec/examples/env.html)).\n\n## Adopters\n\nHere are some of the companies and individual users that are using Mosec:\n\n- [Modelz](https://modelz.ai): Serverless platform for ML inference.\n- [MOSS](https://github.com/OpenLMLab/MOSS/blob/main/README_en.md): An open sourced conversational language model like ChatGPT.\n- [TencentCloud](https://www.tencentcloud.com/document/product/1141/45261): Tencent Cloud Machine Learning Platform, using Mosec as the [core inference server framework](https://cloud.tencent.com/document/product/851/74148).\n- [TensorChord](https://github.com/tensorchord): Cloud native AI infrastructure company.\n\n## Citation\n\nIf you find this software useful for your research, please consider citing\n\n```\n@software{yang2021mosec,\n  title = {{MOSEC: Model Serving made Efficient in the Cloud}},\n  author = {Yang, Keming and Liu, Zichen and Cheng, Philip},\n  url = {https://github.com/mosecorg/mosec},\n  year = {2021}\n}\n```\n\n## Contributing\n\nWe welcome any kind of contribution. Please give us feedback by [raising issues](https://github.com/mosecorg/mosec/issues/new/choose) or discussing on [Discord](https://discord.gg/Jq5vxuH69W). You could also directly [contribute](https://mosecorg.github.io/mosec/development/contributing.html) your code and pull request!\n\nTo start develop, you can use [envd](https://github.com/tensorchord/envd) to create an isolated and clean Python & Rust environment. Check the [envd-docs](https://envd.tensorchord.ai/) or [build.envd](https://github.com/mosecorg/mosec/blob/main/build.envd) for more information.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Model Serving made Efficient in the Cloud",
    "version": "0.8.4",
    "project_urls": {
        "Homepage": "https://github.com/mosecorg/mosec",
        "changelog": "https://github.com/mosecorg/mosec/releases",
        "documentation": "https://mosecorg.github.io/mosec/",
        "homepage": "https://mosecorg.github.io/",
        "repository": "https://github.com/mosecorg/mosec"
    },
    "split_keywords": [
        "machine learning",
        "deep learning",
        "model serving"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "643ca180eeb06260bdb540bdfe49e2dff2dcc6ffc95ff3a509c6c5240a4a821e",
                "md5": "f4302698abfe7458c7f43e55d826e878",
                "sha256": "f333f3c00921df9d3304a5499a52e76ff94d414b2359895024b418648a7ec089"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp310-cp310-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f4302698abfe7458c7f43e55d826e878",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 4965986,
            "upload_time": "2024-02-27T08:04:10",
            "upload_time_iso_8601": "2024-02-27T08:04:10.586080Z",
            "url": "https://files.pythonhosted.org/packages/64/3c/a180eeb06260bdb540bdfe49e2dff2dcc6ffc95ff3a509c6c5240a4a821e/mosec-0.8.4-cp310-cp310-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1e5e54a78edacdd819aef57afe4d4cfb176eb3bf3eababe88685296c88594851",
                "md5": "76f62d7b41b8779511a76f1e62f190b8",
                "sha256": "1a08f7bda99d9abc764fd28cc00612fba36be5f4f269588cd39d0f3ce4bed8cd"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp310-cp310-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "76f62d7b41b8779511a76f1e62f190b8",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 4996556,
            "upload_time": "2024-02-27T08:04:12",
            "upload_time_iso_8601": "2024-02-27T08:04:12.594259Z",
            "url": "https://files.pythonhosted.org/packages/1e/5e/54a78edacdd819aef57afe4d4cfb176eb3bf3eababe88685296c88594851/mosec-0.8.4-cp310-cp310-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c4e1215077d344827a177f0474f3e8ae61cb6dffef8abd0e45058877342d2460",
                "md5": "12d6c1b52d03eca53a19ee39f4ee153b",
                "sha256": "8e7bac062df03eeb5d7f18791d13ede24df5058e676a66318acd726877b5498f"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "12d6c1b52d03eca53a19ee39f4ee153b",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 5880652,
            "upload_time": "2024-02-27T08:04:14",
            "upload_time_iso_8601": "2024-02-27T08:04:14.191189Z",
            "url": "https://files.pythonhosted.org/packages/c4/e1/215077d344827a177f0474f3e8ae61cb6dffef8abd0e45058877342d2460/mosec-0.8.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c28db081ed9cfba2f370e7338d947cddc427d68b4e3cc50caa21eb8c54a80dff",
                "md5": "1e1c2a79fa2e6cc11f140b99d7d8636a",
                "sha256": "73a8d41e630e61ff67291df699ba6f6d9f35e461e4e38ad2a433c3613f024f3b"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp311-cp311-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "1e1c2a79fa2e6cc11f140b99d7d8636a",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 4965985,
            "upload_time": "2024-02-27T08:04:15",
            "upload_time_iso_8601": "2024-02-27T08:04:15.715227Z",
            "url": "https://files.pythonhosted.org/packages/c2/8d/b081ed9cfba2f370e7338d947cddc427d68b4e3cc50caa21eb8c54a80dff/mosec-0.8.4-cp311-cp311-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "66e6ec7cd98303906b915731afeaae0e3bd70785a141b558a1b58200d27e02a8",
                "md5": "c5c065cc8272fdacee00141fd2d49af0",
                "sha256": "1db2ed0b3268fea18dd845b5ffe4c414055e4f8a0fc1856eda0481ecbcd0cf16"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp311-cp311-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "c5c065cc8272fdacee00141fd2d49af0",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 4996556,
            "upload_time": "2024-02-27T08:04:17",
            "upload_time_iso_8601": "2024-02-27T08:04:17.405984Z",
            "url": "https://files.pythonhosted.org/packages/66/e6/ec7cd98303906b915731afeaae0e3bd70785a141b558a1b58200d27e02a8/mosec-0.8.4-cp311-cp311-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8534841c7ded57ce4e6d033febc5d42ba913d086afa117b39a07bc68c863c42c",
                "md5": "b1f711403b45ea701f96f5a47a926ab2",
                "sha256": "a7fa4a5eeee825bf2ee808ae2cca13d3b629af03512d5dfb344738bb34a05713"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b1f711403b45ea701f96f5a47a926ab2",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 5880651,
            "upload_time": "2024-02-27T08:04:19",
            "upload_time_iso_8601": "2024-02-27T08:04:19.614179Z",
            "url": "https://files.pythonhosted.org/packages/85/34/841c7ded57ce4e6d033febc5d42ba913d086afa117b39a07bc68c863c42c/mosec-0.8.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92873471074105131499e8163fe3b804a2c763cc16a149ab37398fe968da61e3",
                "md5": "6ac405e9317e3f128577c912bf622428",
                "sha256": "a49ee7db4610fad553209c0e47f14c3c61ceb22dd2f54117775056ac7deb2e37"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp312-cp312-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "6ac405e9317e3f128577c912bf622428",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 4965985,
            "upload_time": "2024-02-27T08:04:21",
            "upload_time_iso_8601": "2024-02-27T08:04:21.206062Z",
            "url": "https://files.pythonhosted.org/packages/92/87/3471074105131499e8163fe3b804a2c763cc16a149ab37398fe968da61e3/mosec-0.8.4-cp312-cp312-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4942d66673c5f3d238051a7e4f55d4fbd11f82206e404c398b6f9551fdee1932",
                "md5": "b2cc11946d00c58a7bce74547bacb4b2",
                "sha256": "31bcad601705ffe105f17d4ef13376e0175b2f2a5059eabfc02cc018bae0ec20"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp312-cp312-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "b2cc11946d00c58a7bce74547bacb4b2",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 4996556,
            "upload_time": "2024-02-27T08:04:22",
            "upload_time_iso_8601": "2024-02-27T08:04:22.894976Z",
            "url": "https://files.pythonhosted.org/packages/49/42/d66673c5f3d238051a7e4f55d4fbd11f82206e404c398b6f9551fdee1932/mosec-0.8.4-cp312-cp312-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "518558f32a06828c29642fee9f5407b9fc910875fa08f4b91799ef8919769d58",
                "md5": "905f65203903cde290eb24f9a002842e",
                "sha256": "01a73219d137eb7ec0d28e63be61c7ee415e6f8f92b6cfd1e2d338fa7907fc6c"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "905f65203903cde290eb24f9a002842e",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 5880650,
            "upload_time": "2024-02-27T08:04:24",
            "upload_time_iso_8601": "2024-02-27T08:04:24.495628Z",
            "url": "https://files.pythonhosted.org/packages/51/85/58f32a06828c29642fee9f5407b9fc910875fa08f4b91799ef8919769d58/mosec-0.8.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "12db3d6c31f73dcf6b5c1bbdbeecfa11ee4ec06737a8cd1037afa88b1ff0c1d6",
                "md5": "efd793c271366fe797d5866a34da6455",
                "sha256": "82bd1ea482d32ac6321e999ab2e0a6a62e1c5f8ac24f1c1482ad0b92198866e7"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp38-cp38-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "efd793c271366fe797d5866a34da6455",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 4965984,
            "upload_time": "2024-02-27T08:04:26",
            "upload_time_iso_8601": "2024-02-27T08:04:26.736205Z",
            "url": "https://files.pythonhosted.org/packages/12/db/3d6c31f73dcf6b5c1bbdbeecfa11ee4ec06737a8cd1037afa88b1ff0c1d6/mosec-0.8.4-cp38-cp38-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "848e3b664ceb16b5948eee614e32a2a85fd27b44e790df376d929800f57f1abe",
                "md5": "0a414cfc407875314f4831c84c84c6be",
                "sha256": "57518fc0e19f936714cba5f6faad017501638563d8acc1bc3d3488404e8586b1"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp38-cp38-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "0a414cfc407875314f4831c84c84c6be",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 4996555,
            "upload_time": "2024-02-27T08:04:28",
            "upload_time_iso_8601": "2024-02-27T08:04:28.216241Z",
            "url": "https://files.pythonhosted.org/packages/84/8e/3b664ceb16b5948eee614e32a2a85fd27b44e790df376d929800f57f1abe/mosec-0.8.4-cp38-cp38-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e1ede4bfbeb3609a3923aa08f8f9b0cac4fe351e0acdcdde225f80a8ddeaf76",
                "md5": "f05aac66490d4839027d450ffd77c689",
                "sha256": "7e701306b3bb384024882ef7f4a9b3fb623362a21fb19770a58984013237d3a1"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f05aac66490d4839027d450ffd77c689",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 5880651,
            "upload_time": "2024-02-27T08:04:30",
            "upload_time_iso_8601": "2024-02-27T08:04:30.647592Z",
            "url": "https://files.pythonhosted.org/packages/2e/1e/de4bfbeb3609a3923aa08f8f9b0cac4fe351e0acdcdde225f80a8ddeaf76/mosec-0.8.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a82cff0d50a5ad4557eea259dee94249fbb7cb806ef7e2d3f1e2d1e55e16dcad",
                "md5": "860a868a8657f0ece479bd430e3dca00",
                "sha256": "e96f891103f1104639baf5dc922dd542cd74be7713b4e0a651c955ff9b309c87"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp39-cp39-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "860a868a8657f0ece479bd430e3dca00",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 4965983,
            "upload_time": "2024-02-27T08:04:32",
            "upload_time_iso_8601": "2024-02-27T08:04:32.870819Z",
            "url": "https://files.pythonhosted.org/packages/a8/2c/ff0d50a5ad4557eea259dee94249fbb7cb806ef7e2d3f1e2d1e55e16dcad/mosec-0.8.4-cp39-cp39-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "628839319d56b13b706f8c66e010160e7876368ee0e05d06607cced5729993bc",
                "md5": "ee8c3784feb11183ff04da6dae80a47d",
                "sha256": "073d121368443d6fa80a71e02750fe38a4dac3912fe0979ebd479eea087faede"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp39-cp39-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "ee8c3784feb11183ff04da6dae80a47d",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 4996555,
            "upload_time": "2024-02-27T08:04:35",
            "upload_time_iso_8601": "2024-02-27T08:04:35.092952Z",
            "url": "https://files.pythonhosted.org/packages/62/88/39319d56b13b706f8c66e010160e7876368ee0e05d06607cced5729993bc/mosec-0.8.4-cp39-cp39-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "78fbceb3bde06fc3bc337cf5c255853da215fd828a5b8d069fbdfdd93d79b3cc",
                "md5": "0765994095cda03d57aa99e1282a4bfa",
                "sha256": "dbe0321e1a9e06841be94a67ff38f73dcc81c910084931bec9b8bcf41459f17d"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "0765994095cda03d57aa99e1282a4bfa",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 5880652,
            "upload_time": "2024-02-27T08:04:37",
            "upload_time_iso_8601": "2024-02-27T08:04:37.328017Z",
            "url": "https://files.pythonhosted.org/packages/78/fb/ceb3bde06fc3bc337cf5c255853da215fd828a5b8d069fbdfdd93d79b3cc/mosec-0.8.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2c7e6db61336580d347ec3bdf9be56e3a6e239b824d4b7f98f8ec39679b2e564",
                "md5": "b960fada07b6df1c2c7b028da0067a0b",
                "sha256": "21c52e4c0fcdfad98a1491f63565f7e189f2641c3cb82b7c641a4b9bcb5c1fd9"
            },
            "downloads": -1,
            "filename": "mosec-0.8.4.tar.gz",
            "has_sig": false,
            "md5_digest": "b960fada07b6df1c2c7b028da0067a0b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 85146,
            "upload_time": "2024-02-27T08:13:21",
            "upload_time_iso_8601": "2024-02-27T08:13:21.916321Z",
            "url": "https://files.pythonhosted.org/packages/2c/7e/6db61336580d347ec3bdf9be56e3a6e239b824d4b7f98f8ec39679b2e564/mosec-0.8.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-27 08:13:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mosecorg",
    "github_project": "mosec",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mosec"
}
        
Elapsed time: 0.20369s