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.6.2rc1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

mlserver_alibi_detect-1.6.2rc1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file mlserver_alibi_detect-1.6.2rc1.tar.gz.

File metadata

  • Download URL: mlserver_alibi_detect-1.6.2rc1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/6.5.0-1025-azure

File hashes

Hashes for mlserver_alibi_detect-1.6.2rc1.tar.gz
Algorithm Hash digest
SHA256 73cebd58a44861101796b1abdf89623212feab58600f812526cfc7b868868c30
MD5 129476ef2ace23aa3c9eedb93e710494
BLAKE2b-256 fc8b5de0aefed974c2d8a9216063f8cce59175c80c1e8d4098be4d14bdae25b2

See more details on using hashes here.

File details

Details for the file mlserver_alibi_detect-1.6.2rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for mlserver_alibi_detect-1.6.2rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 f350a9f4ac1a58e6f94eed72e707ea2bfa2283a2a0ba2fd52aaeecd2a19ab9fc
MD5 3b56093132a70294c755795936040861
BLAKE2b-256 fdde4a5c8eb5e62f2872357e77862f99e7e931c37e84655b6de01403a03113d1

See more details on using hashes here.

Supported by

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