Skip to main content

Alibi-Detect runtime for MLServer

Project description

Alibi-Detect runtime for MLServer

This package provides a MLServer runtime compatible with alibi-detect models.

Usage

You can install the mlserver-alibi-detect runtime, alongside mlserver, as:

pip install mlserver mlserver-alibi-detect

For further information on how to use MLServer with Alibi-Detect, you can check out this worked out example.

Content Types

If no content type is present on the request or metadata, the Alibi-Detect runtime will try to decode the payload as a NumPy Array. To avoid this, either send a different content type explicitly, or define the correct one as part of your model's metadata.

Settings

The Alibi Detect runtime exposes a couple setting flags which can be used to customise how the runtime behaves. These settings can be added under the parameters.extra section of your model-settings.json file, e.g.

---
emphasize-lines: 6-8
---
{
  "name": "drift-detector",
  "implementation": "mlserver_alibi_detect.AlibiDetectRuntime",
  "parameters": {
    "uri": "./alibi-detect-artifact/",
    "extra": {
      "batch_size": 5
    }
  }
}

Reference

You can find the full reference of the accepted extra settings for the Alibi Detect runtime below:

.. autopydantic_settings:: mlserver_alibi_detect.runtime.AlibiDetectSettings

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

mlserver-alibi-detect-1.3.0.dev14.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

mlserver_alibi_detect-1.3.0.dev14-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file mlserver-alibi-detect-1.3.0.dev14.tar.gz.

File metadata

File hashes

Hashes for mlserver-alibi-detect-1.3.0.dev14.tar.gz
Algorithm Hash digest
SHA256 2ed141e0f5b3149efb78b2fcb07901d9de831aff89c86d94d08584fc30f9a0cf
MD5 f37277526ce523919c039822ebcbdf07
BLAKE2b-256 960cb6c671fb5bfa21516fd78eba2ee033831972d6699bf27815633637da6b99

See more details on using hashes here.

File details

Details for the file mlserver_alibi_detect-1.3.0.dev14-py3-none-any.whl.

File metadata

File hashes

Hashes for mlserver_alibi_detect-1.3.0.dev14-py3-none-any.whl
Algorithm Hash digest
SHA256 873586158c4621d8f7ee3514f4ed50bf6a140d2181e4e18fef1334671999bea1
MD5 d50a91e8a5462ecff5c78aa1362fd699
BLAKE2b-256 49e75691beb9dd62ba2690b23aefd818f6867892f58f3eb96405b37a07388808

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