Skip to content

Commit

Permalink
feat: Adding new fields for concurrent explanations
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 578251436
  • Loading branch information
Google APIs authored and Copybara-Service committed Oct 31, 2023
1 parent f9bd3d0 commit e85bb34
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions google/cloud/aiplatform/v1beta1/prediction_service.proto
Expand Up @@ -304,6 +304,16 @@ message ExplainRequest {
// - Using different baselines for explaining the prediction results.
ExplanationSpecOverride explanation_spec_override = 5;

// Optional. This field is the same as the one above, but supports multiple
// explanations to occur in parallel. The key can be any string. Each override
// will be run against the model, then its explanations will be grouped
// together.
//
// Note - these explanations are run **In Addition** to the default
// Explanation in the deployed model.
map<string, ExplanationSpecOverride> concurrent_explanation_spec_override = 6
[(google.api.field_behavior) = OPTIONAL];

// If specified, this ExplainRequest will be served by the chosen
// DeployedModel, overriding
// [Endpoint.traffic_split][google.cloud.aiplatform.v1beta1.Endpoint.traffic_split].
Expand All @@ -313,6 +323,17 @@ message ExplainRequest {
// Response message for
// [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain].
message ExplainResponse {
// This message is a wrapper grouping Concurrent Explanations.
message ConcurrentExplanation {
// The explanations of the Model's
// [PredictResponse.predictions][google.cloud.aiplatform.v1beta1.PredictResponse.predictions].
//
// It has the same number of elements as
// [instances][google.cloud.aiplatform.v1beta1.ExplainRequest.instances] to
// be explained.
repeated Explanation explanations = 1;
}

// The explanations of the Model's
// [PredictResponse.predictions][google.cloud.aiplatform.v1beta1.PredictResponse.predictions].
//
Expand All @@ -321,6 +342,10 @@ message ExplainResponse {
// explained.
repeated Explanation explanations = 1;

// This field stores the results of the explanations run in parallel with
// the default explanation strategy/method.
map<string, ConcurrentExplanation> concurrent_explanations = 4;

// ID of the Endpoint's DeployedModel that served this explanation.
string deployed_model_id = 2;

Expand Down

0 comments on commit e85bb34

Please sign in to comment.