Quickstart: Inferences
Observability for all model types (LLM, NLP, CV, Tabular)
Last updated
Was this helpful?
Observability for all model types (LLM, NLP, CV, Tabular)
Last updated
Was this helpful?
Phoenix Inferences allows you to observe the performance of your model through visualizing all the model’s inferences in one interactive UMAP view.
This powerful visualization can be leveraged during EDA to understand model drift, find low performing clusters, uncover retrieval issues, and export data for retraining / fine tuning.
The following Quickstart can be executed in a Jupyter notebook or Google Colab.
We will begin by logging just a training set. Then proceed to add a production set for comparison.
Use pip
or conda
to install arize-phoenix
. Note that since we are going to do embedding analysis we must also add the embeddings extra.
Phoenix visualizes data taken from pandas dataframe, where each row of the dataframe compasses all the information about each inference (including feature values, prediction, metadata, etc.)
For this Quickstart, we will show an example of visualizing the inferences from a computer vision model. See example notebooks for all model types .
Let’s begin by working with the training set for this model.
Download the dataset and load it into a Pandas dataframe.
Preview the dataframe with train_df.head()
and note that each row contains all the data specific to this CV model for each inference.
Before we can log these inferences, we need to define a Schema object to describe them.
The Schema object informs Phoenix of the fields that the columns of the dataframe should map to.
Here we define a Schema to describe our particular CV training set:
Important: The fields used in a Schema will vary depending on the model type that you are working with.
Wrap your train_df
and schema train_schema
into a Phoenix Inferences
object:
We are now ready to launch Phoenix with our Inferences!
Here, we are passing train_ds
as the primary
inferences, as we are only visualizing one inference set (see Step 6 for adding additional inference sets).
Running this will fire up a Phoenix visualization. Follow in the instructions in the output to view Phoenix in a browser, or in-line in your notebook:
You are now ready to observe the training set of your model!
Optional - try the following exercises to familiarize yourself more with Phoenix:
We will continue on with our CV model example above, and add a set of production data from our model to our visualization.
This will allow us to analyze drift and conduct A/B comparisons of our production data against our training set.
Note that this schema differs slightly from our train_schema
above, as our prod_df
does not have a ground truth column!
This time, we will include both train_ds
and prod_ds
when calling launch_app
.
Once again, enter your Phoenix app with the new link generated by your session. e.g.
You are now ready to conduct comparative Root Cause Analysis!
Optional - try the following exercises to familiarize yourself more with Phoenix:
Once you have identified datapoints of interest, you can export this data directly from the Phoenix app for further analysis, or to incorporate these into downstream model retraining and finetuning flows.
Once your model is ready for production, you can add Arize to enable production-grade observability. Phoenix works in conjunction with Arize to enable end-to-end model development and observability.
With Arize, you will additionally benefit from:
Being able to publish and observe your models in real-time as inferences are being served, and/or via direct connectors from your table/storage solution
Scalable compute to handle billions of predictions
Ability to set up monitors & alerts
Production-grade observability
Integration with Phoenix for model iteration to observability
Enterprise-grade RBAC and SSO
Experiment with infinite permutations of model versions and filters
For examples on how Schema are defined for other model types (NLP, tabular, LLM-based applications), see example notebooks under and .
Checkpoint A.
Note that Phoenix automatically generates clusters for you on your data using a clustering algorithm called HDBSCAN (more information: )
Discuss your answers in our !
In order to visualize drift, conduct A/B model comparisons, or in the case of an information retrieval use case, compare inferences against a , you will need to add a comparison dataset to your visualization.
Read more about comparison dataset Schemas here:
Checkpoint B.
Discuss your answers in our !
See more on exporting data .
Create your and see the full suite of features.
Read more about Embeddings Analysis
Join the to ask questions, share findings, provide feedback, and connect with other developers.