bulkLog
Call arize.bulkLog to publish the features, predicted label, actual, and SHAP for a single data point to Arize for monitoring, analysis, and explainability in bulk.
Overview
Use the initialized Arize client to call arize.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 SchemaAPI
<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;
Important: If multiple iterable arguments (i.e prediction, actual, and explainability) are passed in the same call, they must be (1) the same length, (2) map to the same predictionIds by entry.
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 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 | Optional |
embeddingFeatures | Map<String, Embedding> | Map containing human readable and debuggable model embedding features. Map keys must be | 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 | 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 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, | 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 If 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
Last updated