Skip to main content

ML Observability in your notebook

Project description

phoenix logo

Phoenix provides MLOps insights at lightning speed with zero-config observability for model drift, performance, and data quality. Phoenix is notebook-first python library that leverages embeddings to uncover problematic cohorts of your LLM, CV, NLP and tabular models.

a rotating UMAP point cloud of a computer vision model

Installation

pip install arize-phoenix

Quickstart

Open in Colab Open in GitHub

Import libraries.

from dataclasses import replace
import pandas as pd
import phoenix as px

Download curated datasets and load them into pandas DataFrames.

train_df = pd.read_parquet(
    "https://storage.googleapis.com/arize-assets/phoenix/datasets/unstructured/cv/human-actions/human_actions_training.parquet"
)
prod_df = pd.read_parquet(
    "https://storage.googleapis.com/arize-assets/phoenix/datasets/unstructured/cv/human-actions/human_actions_production.parquet"
)

Define schemas that tell Phoenix which columns of your DataFrames correspond to features, predictions, actuals (i.e., ground truth), embeddings, etc.

train_schema = px.Schema(
    prediction_id_column_name="prediction_id",
    timestamp_column_name="prediction_ts",
    prediction_label_column_name="predicted_action",
    actual_label_column_name="actual_action",
    embedding_feature_column_names={
        "image_embedding": px.EmbeddingColumnNames(
            vector_column_name="image_vector",
            link_to_data_column_name="url",
        ),
    },
)
prod_schema = replace(train_schema, actual_label_column_name=None)

Define your production and training datasets.

prod_ds = px.Dataset(prod_df, prod_schema)
train_ds = px.Dataset(train_df, train_schema)

Launch the app.

session = px.launch_app(prod_ds, train_ds)

You can open Phoenix by copying and pasting the output of session.url into a new browser tab.

session.url

Alternatively, you can open the Phoenix UI in your notebook with

session.view()

When you're done, don't forget to close the app.

px.close_app()

Features

Embedding Drift Analysis

Explore UMAP point-clouds at times of high euclidean distance and identify clusters of drift.

Euclidean distance drift analysis

UMAP-based Exploratory Data Analysis

Color your UMAP point-clouds by your model's dimensions, drift, and performance to identify problematic cohorts.

UMAP-based EDA

Cluster-driven Drift and Performance Analysis

Break-apart your data into clusters of high drift or bad performance using HDBSCAN

HDBSCAN clusters sorted by drift

Exportable Clusters

Export your clusters to parquet files or dataframes for further analysis and fine-tuning.

Documentation

For in-depth examples and explanations, read the docs.

Community

Join our community to connect with thousands of machine learning practitioners and ML observability enthusiasts.

Thanks

  • UMAP For unlocking the ability to visualize and reason about embeddings
  • HDBSCAN For providing a clustering algorithm to aid in the discovery of drift and performance degradation

Copyright, Patent, and License

Copyright 2023 Arize AI, Inc. All Rights Reserved.

Portions of this code are patent protected by one or more U.S. Patents. See IP_NOTICE.

This software is licensed under the terms of the Elastic License 2.0 (ELv2). See LICENSE.

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

arize_phoenix-0.0.37.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

arize_phoenix-0.0.37-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file arize_phoenix-0.0.37.tar.gz.

File metadata

  • Download URL: arize_phoenix-0.0.37.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for arize_phoenix-0.0.37.tar.gz
Algorithm Hash digest
SHA256 05301441c705ac7150ad9a1b358ed05176bf70492cbde6931a0bdda4378b8697
MD5 1224f4a17a76df619af2d26f2f73bf55
BLAKE2b-256 2682baabb567a0ef9f7f22ba28dd05c58c27f8fb4f66d96a9db887d35632d653

See more details on using hashes here.

File details

Details for the file arize_phoenix-0.0.37-py3-none-any.whl.

File metadata

File hashes

Hashes for arize_phoenix-0.0.37-py3-none-any.whl
Algorithm Hash digest
SHA256 1c9942b22d12bc62cc1f618cc04aab4178cc97897a5ff651f3d8461596cd91d6
MD5 df5bc30d1a7547f0730a9b7ac81e5ee7
BLAKE2b-256 cc7b1fbe0bf824b752b2c757bc49f328fe18cd1eefb5e4d5684e71c293248956

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