Overview
Use the initialized Arize client to callarize.bulkLog() with collections of predicted labels, observed actuals, their feature inputs, their shap values, and corresponding prediction ids. Once records are sent to Arize’s platform, you’ll be able to visualize and analyze data holistically or within aggregated slices.
arize.bulkLog() returns a Response. You can await on the Response to complete to ensure successful delivery of records.
When logging a prediction for the first time for a new model, we classify the model in the Arize platform based on the data type of the prediction.
For more information on model schema discovery, visit here:
What Is A Model Schema
API
<T> Response bulkLog( final String modelId, final String modelVersion, final List<String> predictionIds, final List<Map<String, ?>> features, final List<Map<String, ?>> tags, final List<Map<String, Embedding>> embeddingFeatures, final List<T> predictionLabels, final List<T> actualLabels, final List<Map<String, Double>> shapValues final List<Long> predictionTimestamps) throws IOException, IllegalArgumentException;
API Arguments
| Paramater | Data Type | Description | |
| modelId | String | The unique identifier for your model. | Required |
| modelVersion | String | Used to group together a subset of predictions and actuals for a given model_id. | Required for logging predictions. Optional for logging actuals or shap values. |
| predictionIds | List<Strings> | Unique identifiers for all your bulk predictions contained in a List<Strings>Important: The values are used to match predictions to actual labels or feature importances (SHAP) in the Arize platform. | Required |
| features | List<Map<String, ?>>Where value can be oneOf: String, int, long, short, double, float, boolean, List<String> | List of Maps containing human readable and debuggable model features. Keys must be Strings and values one of: String, int, long, short, double, float, boolean, List<String> | Optional |
| embeddingFeatures | Map<String, Embedding> | Map containing human readable and debuggable model embedding features. Map keys must be String and values Embedding | Optional |
| tags | Map<String, ?> Where value can be oneOf: String, int, long, short, double, float, boolean, List<String> | Map containing human readable and debuggable model features. Map keys must be String and values one of: String, int, long, short, double, float, boolean, List<String> | Optional |
| predictionLabels | List<T> where T is oneof String, boolean, int, long, short, float, double, ScoreCategorical | The predicted labels for your given model inputs contained in a List<T>Important: If sent in as an argument, entries are matched respectively to the entries in prediction ids, feature values, and feature importances in the same index.Important: Must have the same number of elements as feature, actuals, and importances is all sent together. | Optional |
| actualLabels | List<T> where T is oneof String, boolean, int, long, short, float, double, ScoreCategorical | The actual observed labels for a given model input.Important: If passed together in a single call with predictionLabels, both inputs must have the same shape.Important: If model is Score Categorical, Arize.ScoreCategorical object should be passed in with corresponding predictedLabel, probabilityScore. | Optional |
| shapValues | List<Map<String, Double>> | The SHAP value sets for a set of predictions.SHAP value sets are correspond to the prediction ids with the same index. | Optional |
| predictionTimestamps | List<int> | List of int representing Unix epoch time in seconds, set to overwrite the timestamp for prediction.If null, defaults to using the current timestamp.Important: Future and Historical predictions are supported up to 1 year from current wall clock time. | Optional |
Sample Code
Sample Code - Sending Data for Ranking Models
Questions? Email us at support@arize.com or Slack us in the #arize-support channel