logTrainingRecords
Overview
Use the initialized Arize client to call arize.logTrainingRecords()
with collections of predicted and actual labels, its feature inputs, 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 and use this data to compare against your production and validation results.
arize.logTrainingRecords()
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 SchemaThese are training "inferences", the response of your model to training data or a sample of training data. It is not just the training data set. Inferences include the prediction output of the model and data inputs - they give the Arize platform the ability to compare the models response (evaluations) to data versus production.
Different model versions will have different responses to the same training data and capturing inferences allows Arize to evaluate the response.
API
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 |
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. | Required |
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, | Required |
Sample Code
Questions? Email us at support@arize.com or Slack us in the #arize-support channel
Last updated