What Is A Model Schema
Overview of Arize Model Inference Schema
Last updated
Copyright © 2023 Arize AI, Inc
Overview of Arize Model Inference Schema
Last updated
Arize stores model data and this data is organized by via model schema.
The Arize model schema consists of model records. Each record can contain the inputs to the model (features), model outputs (predictions), timestamps, latently linked ground truth (actuals), metadata (tags), and model internals (embeddings and/or SHAP).
Prediction ID | Timestamp | Prediction | Actual | Feature | Tag | Embedding | URL |
---|---|---|---|---|---|---|---|
Your model schema differs based on the data ingestion method and model type. Navigate to model types here.
See below for more details, or click to navigate directly to a definition.
Features (Tabular - Structured Data)
Embedding Features (Unstructured Data)
Note: This schema example includes possible inputs using the Python Pandas SDK. Please consult model types for applicable schema parameters relevant to your model.
A unique identifier for your model. Your model name should have a clear name of the business use case (i.e., fraud-prevention-model
)
Model versions capture snapshots of a model at different times. New model versions are created after retraining, new weights, or new features. Each version can contain its own training, validation, and production environment.
In Arize, you can have as many model versions as you want for a model, just as long as you upload them with the same Model ID. Use multiple model versions for a given model to filter and compare in Arize.
A model environment refers to the setup or conditions in which a model is developed. Arize supports uploading training, validation, and production environments. In Arize, a model can have multiple sets of environments depending on how many versions you have.
Training Environment: Where the model learns from the training data, adjusting its parameters to minimize the error in its predictions.
Arize supports multiple training versions for any given model version
Validation Environment: Used to test a model on a separate dataset (validation data) not used in training. This environment helps to fine-tune the model's hyperparameters and prevents overfitting.
We support multiple batches of validation data (i.e. batch1, batch2, etc)
Production Environment: Where the model is deployed to the real-world and provides predictions or classifications for actual use cases.
Production data can help inform retraining efforts, thus creating a new model version.
Arize supports many model types - check out our various Model Types to learn more.
A prediction ID
is an ID that indicates a unique prediction event. A prediction ID is required to connect predictions with delayed actuals (ground truth). Learn how to send delayed (latent) actuals here.
Note: The maximum character limit for prediction ID
is 512 characters
The timestamp indicates when the data will show up in the UI - sent as an integer representing the UNIX Timestamp in seconds. Typically, this is used for the time the prediction was made. However, there are instances such as time series models, where you may want the timestamp to be the date the prediction was made for.
The timestamp field defaults to the time you sent the prediction to Arize. Arize supports sending in timestamps up to 2 year historically and 1 year in the future from the current timestamp.
Arize captures the feature schema as the first prediction is logged. If the features change over time, the feature schema will adjust to show the new schema.
Example row of features
Arize's embedding objects are composed of 3 different pieces of information:
vector (required): the embedding vector itself, representing the unstructured input data. Accepted data types are List[float]
and nd.array[float]
.
data (optional): Typically the raw text represented by the embedding vector. Accepted data types are str
(for words or sentences) and List[str]
(for token arrays).
link to data (optional): Typically a URL linking to the data file (image, audio, video...) represented by the embedding vector. Accepted data types are str
.
Learn more about our embedding features here.
Tags are a convenient way to group predictions by metadata you find important but don't want to send as an input to the model. (i.e., what server/node was this prediction or actual served on, sensitive categories, model or feature operational metrics). Use tags to group, monitor, slice, and investigate the performance of “cohorts” based on user-defined metadata for the model.
Tags can be sent in with predictions or actuals.
If tags are sent in with a prediction and it's corresponding actual, Arize merges the tag maps, keeping the prediction tag’s value if the tag keys are identical.
Example row of tags
Feature importance is a compilation of a class of techniques that take in all the features related to making a model prediction and assign a certain score to each feature to weigh how much or how little it impacted the outcome.
Check out the explainability section to learn more.
For ingesting data via direct UI upload or via any one of our supported integrations (AWS S3, Databricks, etc.), refer to the full list of supported Model Schema fields below:
Questions? Email us at support@arize.com or Slack us in the #arize-support channel
prediction_id | prediction_ts | prediction_label | prediction_score | actual_label | actual_score | feature_1 | tag_1 | vector | text | image_link | group_id_name | rank | relevance_score | actual_relevancy |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
age | distance | purchased |
---|---|---|
location | month | fruit |
---|---|---|
Property | Description | Required |
---|---|---|