mlserver


Namemlserver JSON
Version 1.6.1 PyPI version JSON
download
home_pageNone
SummaryMLServer
upload_time2024-09-10 15:10:22
maintainerNone
docs_urlNone
authorSeldon Technologies Ltd.
requires_python<3.12,>=3.9
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MLServer

An open source inference server for your machine learning models.

[![video_play_icon](https://user-images.githubusercontent.com/10466106/151803854-75d17c32-541c-4eee-b589-d45b07ea486d.png)](https://www.youtube.com/watch?v=aZHe3z-8C_w)

## Overview

MLServer aims to provide an easy way to start serving your machine learning
models through a REST and gRPC interface, fully compliant with [KFServing's V2
Dataplane](https://docs.seldon.io/projects/seldon-core/en/latest/reference/apis/v2-protocol.html)
spec. Watch a quick video introducing the project [here](https://www.youtube.com/watch?v=aZHe3z-8C_w).

- Multi-model serving, letting users run multiple models within the same
  process.
- Ability to run [inference in parallel for vertical
  scaling](https://mlserver.readthedocs.io/en/latest/user-guide/parallel-inference.html)
  across multiple models through a pool of inference workers.
- Support for [adaptive
  batching](https://mlserver.readthedocs.io/en/latest/user-guide/adaptive-batching.html),
  to group inference requests together on the fly.
- Scalability with deployment in Kubernetes native frameworks, including
  [Seldon Core](https://docs.seldon.io/projects/seldon-core/en/latest/graph/protocols.html#v2-kfserving-protocol) and
  [KServe (formerly known as KFServing)](https://kserve.github.io/website/modelserving/v1beta1/sklearn/v2/), where
  MLServer is the core Python inference server used to serve machine learning
  models.
- Support for the standard [V2 Inference Protocol](https://docs.seldon.io/projects/seldon-core/en/latest/reference/apis/v2-protocol.html) on
  both the gRPC and REST flavours, which has been standardised and adopted by
  various model serving frameworks.

You can read more about the goals of this project on the [initial design
document](https://docs.google.com/document/d/1C2uf4SaAtwLTlBCciOhvdiKQ2Eay4U72VxAD4bXe7iU/edit?usp=sharing).

## Usage

You can install the `mlserver` package running:

```bash
pip install mlserver
```

Note that to use any of the optional [inference runtimes](#inference-runtimes),
you'll need to install the relevant package.
For example, to serve a `scikit-learn` model, you would need to install the
`mlserver-sklearn` package:

```bash
pip install mlserver-sklearn
```

For further information on how to use MLServer, you can check any of the
[available examples](#examples).

## Inference Runtimes

Inference runtimes allow you to define how your model should be used within
MLServer.
You can think of them as the **backend glue** between MLServer and your machine
learning framework of choice.
You can read more about [inference runtimes in their documentation
page](./docs/runtimes/index.md).

Out of the box, MLServer comes with a set of pre-packaged runtimes which let
you interact with a subset of common frameworks.
This allows you to start serving models saved in these frameworks straight
away.
However, it's also possible to **[write custom
runtimes](./docs/runtimes/custom.md)**.

Out of the box, MLServer provides support for:

| Framework     | Supported | Documentation                                                    |
| ------------- | --------- | ---------------------------------------------------------------- |
| Scikit-Learn  | ✅        | [MLServer SKLearn](./runtimes/sklearn)                           |
| XGBoost       | ✅        | [MLServer XGBoost](./runtimes/xgboost)                           |
| Spark MLlib   | ✅        | [MLServer MLlib](./runtimes/mllib)                               |
| LightGBM      | ✅        | [MLServer LightGBM](./runtimes/lightgbm)                         |
| CatBoost      | ✅        | [MLServer CatBoost](./runtimes/catboost)                         |
| Tempo         | ✅        | [`github.com/SeldonIO/tempo`](https://github.com/SeldonIO/tempo) |
| MLflow        | ✅        | [MLServer MLflow](./runtimes/mlflow)                             |
| Alibi-Detect  | ✅        | [MLServer Alibi Detect](./runtimes/alibi-detect)                 |
| Alibi-Explain | ✅        | [MLServer Alibi Explain](./runtimes/alibi-explain)               |
| HuggingFace   | ✅        | [MLServer HuggingFace](./runtimes/huggingface)                   |

MLServer is licensed under the Apache License, Version 2.0. However please note that software used in conjunction with, or alongside, MLServer may be licensed under different terms. For example, Alibi Detect and Alibi Explain are both licensed under the Business Source License 1.1. For more information about the legal terms of products that are used in conjunction with or alongside MLServer, please refer to their respective documentation.

## Supported Python Versions

🔴 Unsupported

🟠 Deprecated: To be removed in a future version

🟢 Supported

🔵 Untested

| Python Version | Status |
| -------------- | ------ |
| 3.7            | 🔴     |
| 3.8            | 🔴     |
| 3.9            | 🟢     |
| 3.10           | 🟢     |
| 3.11           | 🔵     |
| 3.12           | 🔵     |

## Examples

To see MLServer in action, check out [our full list of
examples](./docs/examples/index.md).
You can find below a few selected examples showcasing how you can leverage
MLServer to start serving your machine learning models.

- [Serving a `scikit-learn` model](./docs/examples/sklearn/README.md)
- [Serving a `xgboost` model](./docs/examples/xgboost/README.md)
- [Serving a `lightgbm` model](./docs/examples/lightgbm/README.md)
- [Serving a `catboost` model](./docs/examples/catboost/README.md)
- [Serving a `tempo` pipeline](./docs/examples/tempo/README.md)
- [Serving a custom model](./docs/examples/custom/README.md)
- [Serving an `alibi-detect` model](./docs/examples/alibi-detect/README.md)
- [Serving a `HuggingFace` model](./docs/examples/huggingface/README.md)
- [Multi-Model Serving with multiple frameworks](./docs/examples/mms/README.md)
- [Loading / unloading models from a model repository](./docs/examples/model-repository/README.md)

## Developer Guide

### Versioning

Both the main `mlserver` package and the [inference runtimes
packages](./docs/runtimes/index.md) try to follow the same versioning schema.
To bump the version across all of them, you can use the
[`./hack/update-version.sh`](./hack/update-version.sh) script.

We generally keep the version as a placeholder for an upcoming version.

For example:

```bash
./hack/update-version.sh 0.2.0.dev1
```

### Testing

To run all of the tests for MLServer and the runtimes, use:

```bash
make test
```

To run run tests for a single file, use something like:

```bash
tox -e py3 -- tests/batch_processing/test_rest.py
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mlserver",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.12,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Seldon Technologies Ltd.",
    "author_email": "hello@seldon.io",
    "download_url": "https://files.pythonhosted.org/packages/bf/ab/80ab75d905eb5d38ab95071c8fbe98da5c14a63448297e57860a2b76f492/mlserver-1.6.1.tar.gz",
    "platform": null,
    "description": "# MLServer\n\nAn open source inference server for your machine learning models.\n\n[![video_play_icon](https://user-images.githubusercontent.com/10466106/151803854-75d17c32-541c-4eee-b589-d45b07ea486d.png)](https://www.youtube.com/watch?v=aZHe3z-8C_w)\n\n## Overview\n\nMLServer aims to provide an easy way to start serving your machine learning\nmodels through a REST and gRPC interface, fully compliant with [KFServing's V2\nDataplane](https://docs.seldon.io/projects/seldon-core/en/latest/reference/apis/v2-protocol.html)\nspec. Watch a quick video introducing the project [here](https://www.youtube.com/watch?v=aZHe3z-8C_w).\n\n- Multi-model serving, letting users run multiple models within the same\n  process.\n- Ability to run [inference in parallel for vertical\n  scaling](https://mlserver.readthedocs.io/en/latest/user-guide/parallel-inference.html)\n  across multiple models through a pool of inference workers.\n- Support for [adaptive\n  batching](https://mlserver.readthedocs.io/en/latest/user-guide/adaptive-batching.html),\n  to group inference requests together on the fly.\n- Scalability with deployment in Kubernetes native frameworks, including\n  [Seldon Core](https://docs.seldon.io/projects/seldon-core/en/latest/graph/protocols.html#v2-kfserving-protocol) and\n  [KServe (formerly known as KFServing)](https://kserve.github.io/website/modelserving/v1beta1/sklearn/v2/), where\n  MLServer is the core Python inference server used to serve machine learning\n  models.\n- Support for the standard [V2 Inference Protocol](https://docs.seldon.io/projects/seldon-core/en/latest/reference/apis/v2-protocol.html) on\n  both the gRPC and REST flavours, which has been standardised and adopted by\n  various model serving frameworks.\n\nYou can read more about the goals of this project on the [initial design\ndocument](https://docs.google.com/document/d/1C2uf4SaAtwLTlBCciOhvdiKQ2Eay4U72VxAD4bXe7iU/edit?usp=sharing).\n\n## Usage\n\nYou can install the `mlserver` package running:\n\n```bash\npip install mlserver\n```\n\nNote that to use any of the optional [inference runtimes](#inference-runtimes),\nyou'll need to install the relevant package.\nFor example, to serve a `scikit-learn` model, you would need to install the\n`mlserver-sklearn` package:\n\n```bash\npip install mlserver-sklearn\n```\n\nFor further information on how to use MLServer, you can check any of the\n[available examples](#examples).\n\n## Inference Runtimes\n\nInference runtimes allow you to define how your model should be used within\nMLServer.\nYou can think of them as the **backend glue** between MLServer and your machine\nlearning framework of choice.\nYou can read more about [inference runtimes in their documentation\npage](./docs/runtimes/index.md).\n\nOut of the box, MLServer comes with a set of pre-packaged runtimes which let\nyou interact with a subset of common frameworks.\nThis allows you to start serving models saved in these frameworks straight\naway.\nHowever, it's also possible to **[write custom\nruntimes](./docs/runtimes/custom.md)**.\n\nOut of the box, MLServer provides support for:\n\n| Framework     | Supported | Documentation                                                    |\n| ------------- | --------- | ---------------------------------------------------------------- |\n| Scikit-Learn  | \u2705        | [MLServer SKLearn](./runtimes/sklearn)                           |\n| XGBoost       | \u2705        | [MLServer XGBoost](./runtimes/xgboost)                           |\n| Spark MLlib   | \u2705        | [MLServer MLlib](./runtimes/mllib)                               |\n| LightGBM      | \u2705        | [MLServer LightGBM](./runtimes/lightgbm)                         |\n| CatBoost      | \u2705        | [MLServer CatBoost](./runtimes/catboost)                         |\n| Tempo         | \u2705        | [`github.com/SeldonIO/tempo`](https://github.com/SeldonIO/tempo) |\n| MLflow        | \u2705        | [MLServer MLflow](./runtimes/mlflow)                             |\n| Alibi-Detect  | \u2705        | [MLServer Alibi Detect](./runtimes/alibi-detect)                 |\n| Alibi-Explain | \u2705        | [MLServer Alibi Explain](./runtimes/alibi-explain)               |\n| HuggingFace   | \u2705        | [MLServer HuggingFace](./runtimes/huggingface)                   |\n\nMLServer is licensed under the Apache License, Version 2.0. However please note that software used in conjunction with, or alongside, MLServer may be licensed under different terms. For example, Alibi Detect and Alibi Explain are both licensed under the Business Source License 1.1. For more information about the legal terms of products that are used in conjunction with or alongside MLServer, please refer to their respective documentation.\n\n## Supported Python Versions\n\n\ud83d\udd34 Unsupported\n\n\ud83d\udfe0 Deprecated: To be removed in a future version\n\n\ud83d\udfe2 Supported\n\n\ud83d\udd35 Untested\n\n| Python Version | Status |\n| -------------- | ------ |\n| 3.7            | \ud83d\udd34     |\n| 3.8            | \ud83d\udd34     |\n| 3.9            | \ud83d\udfe2     |\n| 3.10           | \ud83d\udfe2     |\n| 3.11           | \ud83d\udd35     |\n| 3.12           | \ud83d\udd35     |\n\n## Examples\n\nTo see MLServer in action, check out [our full list of\nexamples](./docs/examples/index.md).\nYou can find below a few selected examples showcasing how you can leverage\nMLServer to start serving your machine learning models.\n\n- [Serving a `scikit-learn` model](./docs/examples/sklearn/README.md)\n- [Serving a `xgboost` model](./docs/examples/xgboost/README.md)\n- [Serving a `lightgbm` model](./docs/examples/lightgbm/README.md)\n- [Serving a `catboost` model](./docs/examples/catboost/README.md)\n- [Serving a `tempo` pipeline](./docs/examples/tempo/README.md)\n- [Serving a custom model](./docs/examples/custom/README.md)\n- [Serving an `alibi-detect` model](./docs/examples/alibi-detect/README.md)\n- [Serving a `HuggingFace` model](./docs/examples/huggingface/README.md)\n- [Multi-Model Serving with multiple frameworks](./docs/examples/mms/README.md)\n- [Loading / unloading models from a model repository](./docs/examples/model-repository/README.md)\n\n## Developer Guide\n\n### Versioning\n\nBoth the main `mlserver` package and the [inference runtimes\npackages](./docs/runtimes/index.md) try to follow the same versioning schema.\nTo bump the version across all of them, you can use the\n[`./hack/update-version.sh`](./hack/update-version.sh) script.\n\nWe generally keep the version as a placeholder for an upcoming version.\n\nFor example:\n\n```bash\n./hack/update-version.sh 0.2.0.dev1\n```\n\n### Testing\n\nTo run all of the tests for MLServer and the runtimes, use:\n\n```bash\nmake test\n```\n\nTo run run tests for a single file, use something like:\n\n```bash\ntox -e py3 -- tests/batch_processing/test_rest.py\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "MLServer",
    "version": "1.6.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ae57cbddf24acfb3cd6c05233c595e0c2845e765fdd52ecd22cac4c5f637daf",
                "md5": "3cc220fa8e2609e3670b0ff8227ebb76",
                "sha256": "3226b7f107d2fbe149f79df49cb07e694261a8200ef269c4673db324778cffed"
            },
            "downloads": -1,
            "filename": "mlserver-1.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3cc220fa8e2609e3670b0ff8227ebb76",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.12,>=3.9",
            "size": 129251,
            "upload_time": "2024-09-10T15:10:21",
            "upload_time_iso_8601": "2024-09-10T15:10:21.395655Z",
            "url": "https://files.pythonhosted.org/packages/4a/e5/7cbddf24acfb3cd6c05233c595e0c2845e765fdd52ecd22cac4c5f637daf/mlserver-1.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bfab80ab75d905eb5d38ab95071c8fbe98da5c14a63448297e57860a2b76f492",
                "md5": "8093ee6df90c92b52a1c71a949c8194e",
                "sha256": "4629ce6b7f9b7e7325d6f0e8cd75c66734661cfb2c31be9a8986f44b39ac8451"
            },
            "downloads": -1,
            "filename": "mlserver-1.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8093ee6df90c92b52a1c71a949c8194e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.12,>=3.9",
            "size": 100361,
            "upload_time": "2024-09-10T15:10:22",
            "upload_time_iso_8601": "2024-09-10T15:10:22.994023Z",
            "url": "https://files.pythonhosted.org/packages/bf/ab/80ab75d905eb5d38ab95071c8fbe98da5c14a63448297e57860a2b76f492/mlserver-1.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-10 15:10:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mlserver"
}
        
Elapsed time: 0.32308s