Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
feat: add ImportModelEvaluation in aiplatform v1 model_service.proto (#…
Browse files Browse the repository at this point in the history
…280)

- [ ] Regenerate this pull request now.

feat: add data_item_schema_uri, annotation_schema_uri, explanation_specs to ModelEvaluationExplanationSpec in aiplatform v1 model_evaluation.proto

feat: add ImportModelEvaluation in aiplatform v1beta1 model_service.proto
PiperOrigin-RevId: 436869915

Source-Link: googleapis/googleapis@9ba488b

Source-Link: https://github.com/googleapis/googleapis-gen/commit/908e7f896f876da6a4d05cd0cc4f8eb19c3cc7a9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTA4ZTdmODk2Zjg3NmRhNmE0ZDA1Y2QwY2M0ZjhlYjE5YzNjYzdhOSJ9
  • Loading branch information
gcf-owl-bot[bot] authored Mar 24, 2022
1 parent 0fb9efb commit b769264
Show file tree
Hide file tree
Showing 19 changed files with 2,081 additions and 54 deletions.
55 changes: 47 additions & 8 deletions protos/google/cloud/aiplatform/v1/model_evaluation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,70 @@ message ModelEvaluation {
pattern: "projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}"
};

message ModelEvaluationExplanationSpec {
// Explanation type.
//
// For AutoML Image Classification models, possible values are:
//
// * `image-integrated-gradients`
// * `image-xrai`
string explanation_type = 1;

// Explanation spec details.
ExplanationSpec explanation_spec = 2;
}

// Output only. The resource name of the ModelEvaluation.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Points to a YAML file stored on Google Cloud Storage describing the
// Points to a YAML file stored on Google Cloud Storage describing the
// [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is
// defined as an OpenAPI 3.0.2 [Schema
// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
string metrics_schema_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
string metrics_schema_uri = 2;

// Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
// Evaluation metrics of the Model. The schema of the metrics is stored in
// [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
google.protobuf.Value metrics = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Value metrics = 3;

// Output only. Timestamp when this ModelEvaluation was created.
google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
// All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
// ModelEvaluationSlices. The dimensions can be used as the filter of the
// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
// `slice.dimension = <dimension>`.
repeated string slice_dimensions = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
repeated string slice_dimensions = 5;

// Points to a YAML file stored on Google Cloud Storage describing
// [EvaluatedDataItemView.data_item_payload][] and
// [EvaluatedAnnotation.data_item_payload][]. The schema is defined as an
// OpenAPI 3.0.2 [Schema
// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
//
// This field is not populated if there are neither EvaluatedDataItemViews nor
// EvaluatedAnnotations under this ModelEvaluation.
string data_item_schema_uri = 6;

// Output only. Aggregated explanation metrics for the Model's prediction output over the
// Points to a YAML file stored on Google Cloud Storage describing
// [EvaluatedDataItemView.predictions][],
// [EvaluatedDataItemView.ground_truths][],
// [EvaluatedAnnotation.predictions][], and
// [EvaluatedAnnotation.ground_truths][]. The schema is defined as an
// OpenAPI 3.0.2 [Schema
// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
//
// This field is not populated if there are neither EvaluatedDataItemViews nor
// EvaluatedAnnotations under this ModelEvaluation.
string annotation_schema_uri = 7;

// Aggregated explanation metrics for the Model's prediction output over the
// data this ModelEvaluation uses. This field is populated only if the Model
// is evaluated with explanations, and only for AutoML tabular Models.
//
ModelExplanation model_explanation = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
ModelExplanation model_explanation = 8;

// Describes the values of [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] that are used for explaining
// the predicted values on the evaluated data.
repeated ModelEvaluationExplanationSpec explanation_specs = 9;
}
24 changes: 24 additions & 0 deletions protos/google/cloud/aiplatform/v1/model_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ service ModelService {
};
}

// Imports an externally generated ModelEvaluation.
rpc ImportModelEvaluation(ImportModelEvaluationRequest) returns (ModelEvaluation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*/models/*}/evaluations:import"
body: "*"
};
option (google.api.method_signature) = "parent,model_evaluation";
}

// Gets a ModelEvaluation.
rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) {
option (google.api.http) = {
Expand Down Expand Up @@ -334,6 +343,21 @@ message ExportModelResponse {

}

// Request message for [ModelService.ImportModelEvaluation][google.cloud.aiplatform.v1.ModelService.ImportModelEvaluation]
message ImportModelEvaluationRequest {
// Required. The name of the parent model resource.
// Format: `projects/{project}/locations/{location}/models/{model}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];

// Required. Model evaluation resource to be imported.
ModelEvaluation model_evaluation = 2 [(google.api.field_behavior) = REQUIRED];
}

// Request message for [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1.ModelService.GetModelEvaluation].
message GetModelEvaluationRequest {
// Required. The name of the ModelEvaluation resource.
Expand Down
20 changes: 10 additions & 10 deletions protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,32 +55,32 @@ message ModelEvaluation {
// Output only. The resource name of the ModelEvaluation.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Points to a YAML file stored on Google Cloud Storage describing the
// Points to a YAML file stored on Google Cloud Storage describing the
// [metrics][google.cloud.aiplatform.v1beta1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is
// defined as an OpenAPI 3.0.2 [Schema
// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
string metrics_schema_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
string metrics_schema_uri = 2;

// Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
// Evaluation metrics of the Model. The schema of the metrics is stored in
// [metrics_schema_uri][google.cloud.aiplatform.v1beta1.ModelEvaluation.metrics_schema_uri]
google.protobuf.Value metrics = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Value metrics = 3;

// Output only. Timestamp when this ModelEvaluation was created.
google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
// All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
// ModelEvaluationSlices. The dimensions can be used as the filter of the
// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluationSlices] request, in the form of
// `slice.dimension = <dimension>`.
repeated string slice_dimensions = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
repeated string slice_dimensions = 5;

// Output only. Aggregated explanation metrics for the Model's prediction output over the
// Aggregated explanation metrics for the Model's prediction output over the
// data this ModelEvaluation uses. This field is populated only if the Model
// is evaluated with explanations, and only for AutoML tabular Models.
//
ModelExplanation model_explanation = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
ModelExplanation model_explanation = 8;

// Output only. Describes the values of [ExplanationSpec][google.cloud.aiplatform.v1beta1.ExplanationSpec] that are used for explaining
// Describes the values of [ExplanationSpec][google.cloud.aiplatform.v1beta1.ExplanationSpec] that are used for explaining
// the predicted values on the evaluated data.
repeated ModelEvaluationExplanationSpec explanation_specs = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
repeated ModelEvaluationExplanationSpec explanation_specs = 9;
}
24 changes: 24 additions & 0 deletions protos/google/cloud/aiplatform/v1beta1/model_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ service ModelService {
};
}

// Imports an externally generated ModelEvaluation.
rpc ImportModelEvaluation(ImportModelEvaluationRequest) returns (ModelEvaluation) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*/models/*}/evaluations:import"
body: "*"
};
option (google.api.method_signature) = "parent,model_evaluation";
}

// Gets a ModelEvaluation.
rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) {
option (google.api.http) = {
Expand Down Expand Up @@ -327,6 +336,21 @@ message ExportModelResponse {

}

// Request message for [ModelService.ImportModelEvaluation][google.cloud.aiplatform.v1beta1.ModelService.ImportModelEvaluation]
message ImportModelEvaluationRequest {
// Required. The name of the parent model resource.
// Format: `projects/{project}/locations/{location}/models/{model}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];

// Required. Model evaluation resource to be imported.
ModelEvaluation model_evaluation = 2 [(google.api.field_behavior) = REQUIRED];
}

// Request message for [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1beta1.ModelService.GetModelEvaluation].
message GetModelEvaluationRequest {
// Required. The name of the ModelEvaluation resource.
Expand Down
Loading

0 comments on commit b769264

Please sign in to comment.