Package com.arize
Interface ArizeAPI
-
- All Known Implementing Classes:
ArizeClient
public interface ArizeAPI
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> ResponsebulkLog(String modelId, String modelVersion, List<String> predictionIds, List<Map<String,?>> features, List<Map<String,Embedding>> embeddingFeatures, List<Map<String,?>> tags, List<T> predictionLabels, List<T> actualLabels, List<Map<String,Double>> shapValues, List<Long> predictionTimestamps)logBulkPrediction builds and submits a Bulk Prediction record to the Arize API.<T> Responselog(String modelId, String modelVersion, String predictionId, Map<String,?> features, Map<String,Embedding> embeddingFeatures, Map<String,?> tags, T predictionLabel, T actualLabel, Map<String,Double> shapValues, long predictionTimestamp)log builds and submits a record to the Arize API.<T> ResponselogTrainingRecords(String modelId, String modelVersion, List<Map<String,?>> features, List<Map<String,Embedding>> embeddingFeatures, List<Map<String,?>> tags, List<T> predictionLabels, List<T> actualLabels)<T> ResponselogValidationRecords(String modelId, String modelVersion, String batchId, List<Map<String,?>> features, List<Map<String,Embedding>> embeddingFeatures, List<Map<String,?>> tags, List<T> predictionLabels, List<T> actualLabels)
-
-
-
Method Detail
-
log
<T> Response log(String modelId, String modelVersion, String predictionId, Map<String,?> features, Map<String,Embedding> embeddingFeatures, Map<String,?> tags, T predictionLabel, T actualLabel, Map<String,Double> shapValues, long predictionTimestamp) throws IOException, IllegalArgumentException
log builds and submits a record to the Arize API.- Type Parameters:
T- Boxed type for predictionLabel. Supported boxed types are: boolean, string, int, long, short, float, double.- Parameters:
modelId- Unique identifier for a given model.modelVersion- Model version identifier used to group together a subset of predictions and actuals for a given modelId.predictionId- Required unique identifier for a given prediction.features- OptionalMapcontaining model features. Map key must beStringand values are one of: string, int, long, short, float, double, boolean.embeddingFeatures- OptionalMapcontaining model embedding features. Map key must beStringand valuesEmbeddingtags- OptionalMapcontaining record tags (aka metadata) that can be associated with a prediction. This can be used to filter during analysis. Map key must beStringand values are one of: string, int, long, short, float, double, boolean. by non-feature data.predictionLabel- Predicted value for a given set of model inputs. Supported boxed types are: boolean, string, int, long, short, float, double. Not required if sending latent actual or feature importance.actualLabel- The latent truth value for a given set of model inputs. Supported boxed types are: boolean, string, int, long, short, float, double. This can either be supplied at the same time as the predictionLabel or on its own once it is known, and it will be linked back by the predictionIdshapValues- OptionalMapfrom feature name to shap value. This can either be supplied at the same time as the predictionLabel or on its own, and it will be linked back by the predictionIdpredictionTimestamp- The timestamp to which the prediction should be attributed. If not set this defaults to the time of receipt- Returns:
Response- Throws:
IOException- in case of a network errorIllegalArgumentException- in case data type for features or label are not supported.
-
bulkLog
<T> Response bulkLog(String modelId, String modelVersion, List<String> predictionIds, List<Map<String,?>> features, List<Map<String,Embedding>> embeddingFeatures, List<Map<String,?>> tags, List<T> predictionLabels, List<T> actualLabels, List<Map<String,Double>> shapValues, List<Long> predictionTimestamps) throws IOException, IllegalArgumentException
logBulkPrediction builds and submits a Bulk Prediction record to the Arize API.- Type Parameters:
T- Boxed type for predictionLabel and actualLabel. Supported boxed types are: boolean, string, int, long, short, float, double.- Parameters:
modelId- UniqueStringidentifier for a given model.modelVersion- OptionalStringidentifier used to group together a subset of predictions and actuals for a given modelId.predictionIds-Listof uniqueStringindentifiers for predictions. This value is used to match latent actual labels to their original predictions.features- OptionalListofMapvarargs containing human-readable and debuggable model features. Map key must beStringand values are one of: string, int, long, short, float, double, boolean.embeddingFeatures- OptionalListofMapvarargs containing human-readable and debuggable model embedding features. Map key must beStringand valuesEmbedding.tags- OptionalListofMapvarargs containing record tags/metadata. Map key must beStringand values are one of: string, int, long, short, float, double, boolean.predictionLabels-Listof predicted values. Supported boxed types are: boolean, string, int, long, short, float, double.actualLabels-Listof latent actual values. Supported boxed types are: boolean, string, int, long, short, float, double. This can either be supplied at the same time as the predictionLabels or on their own once they are known, and they will be linked back by the corresponding predictionIdsshapValues- OptionalListofMapfrom feature name to shap value. Can be provided at the same time as the predictionLabels or on their own and they will be linked back by the corresponding predictionIdspredictionTimestamps- OptionalListofLongof unix epoch time in milliseconds used to overwrite timestamp for a prediction.- Returns:
Response- Throws:
IOException- in case of a network errorIllegalArgumentException- in case data type for features or label are not supported.
-
logTrainingRecords
<T> Response logTrainingRecords(String modelId, String modelVersion, List<Map<String,?>> features, List<Map<String,Embedding>> embeddingFeatures, List<Map<String,?>> tags, List<T> predictionLabels, List<T> actualLabels) throws IOException, IllegalArgumentException
- Type Parameters:
T- Boxed type for predictionLabel and actualLabel. Supported boxed types are: boolean, string, int, long, short, float, double.- Parameters:
modelId- UniqueStringidentifier for a given model.modelVersion- OptionalStringidentifier used to group together a subset of predictions and actuals for a given modelId.features- OptionalListofMapvarargs containing human-readable and debuggable model features. Map key must beStringand values are one of: string, int, long, short, float, double, boolean.embeddingFeatures- OptionalListofMapvarargs containing human-readable and debuggable model embedding features. Map key must beStringand valuesEmbedding.tags- OptionalListofMapvarargs containing record tags/metadata. Map key must beStringand values are one of: string, int, long, short, float, double, boolean.predictionLabels-Listof predicted values. Supported boxed types are: boolean, string, int, long, short, float, double.actualLabels-Listof latent actual values. Supported boxed types are: boolean, string, int, long, short, float, double. This can either be supplied at the same time as the predictionLabels or on their own once they are known, and they will be linked back by the corresponding predictionIds- Returns:
Response- Throws:
IOException- in case of a network errorIllegalArgumentException- in case data type for features or label are not supported.
-
logValidationRecords
<T> Response logValidationRecords(String modelId, String modelVersion, String batchId, List<Map<String,?>> features, List<Map<String,Embedding>> embeddingFeatures, List<Map<String,?>> tags, List<T> predictionLabels, List<T> actualLabels) throws IOException
- Type Parameters:
T- Boxed type for predictionLabel and actualLabel. Supported boxed types are: boolean, string, int, long, short, float, double.- Parameters:
modelId- UniqueStringidentifier for a given model.modelVersion- OptionalStringidentifier used to group together a subset of predictions and actuals for a given modelId.batchId- Unique identifier for the validation batch we are adding data tofeatures- OptionalListofMapvarargs containing human readable and debuggable model features. Map key must beStringand values are one of: string, int, long, short, float, double, boolean.embeddingFeatures- OptionalListofMapvarargs containing human-readable and debuggable model embedding features. Map key must beStringand valuesEmbedding.tags- OptionalListofMapvarargs containing record tags/metadata. Map key must beStringand values are one of: string, int, long, short, float, double, boolean.predictionLabels-Listof predicted values. Supported boxed types are: boolean, string, int, long, short, float, double.actualLabels-Listof latent actual values. Supported boxed types are: boolean, string, int, long, short, float, double. This can either be supplied at the same time as the predictionLabels or on their own once they are known, and they will be linked back by the corresponding predictionIds- Returns:
Response- Throws:
IOException- in case of a network errorIllegalArgumentException- in case data type for features or label are not supported.
-
-