Skip to content

Commit 4c047d4

Browse files
feat: add bias_configs to ModelEvaluation (#4349)
* feat: add bias_configs to ModelEvaluation PiperOrigin-RevId: 540693440 Source-Link: googleapis/googleapis@2d7af51 Source-Link: googleapis/googleapis-gen@c5b5857 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6ImM1YjU4NTc0ODNiYzRmNWIzMGQ4ODg1MDg2OWYwZTMzMDJhODJkYzMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent dbeeab9 commit 4c047d4

File tree

4 files changed

+438
-0
lines changed

4 files changed

+438
-0
lines changed

packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package google.cloud.aiplatform.v1beta1;
1919
import "google/api/field_behavior.proto";
2020
import "google/api/resource.proto";
2121
import "google/cloud/aiplatform/v1beta1/explanation.proto";
22+
import "google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto";
2223
import "google/protobuf/struct.proto";
2324
import "google/protobuf/timestamp.proto";
2425

@@ -51,6 +52,38 @@ message ModelEvaluation {
5152
ExplanationSpec explanation_spec = 2;
5253
}
5354

55+
// Configuration for bias detection.
56+
message BiasConfig {
57+
// Specification for how the data should be sliced for bias. It contains a
58+
// list of slices, with limitation of two slices. The first slice of data
59+
// will be the slice_a. The second slice in the list (slice_b) will be
60+
// compared against the first slice. If only a single slice is provided,
61+
// then slice_a will be compared against “not slice_a”.
62+
// Below are examples with feature "education" with value "low", "medium",
63+
// "high" in the dataset:
64+
//
65+
// Example 1:
66+
//
67+
// bias_slices = [{'education': 'low'}]
68+
//
69+
// A single slice provided. In this case, slice_a is the collection of data
70+
// with 'education' equals 'low', and slice_b is the collection of data with
71+
// 'education' equals 'medium' or 'high'.
72+
//
73+
// Example 2:
74+
//
75+
// bias_slices = [{'education': 'low'},
76+
// {'education': 'high'}]
77+
//
78+
// Two slices provided. In this case, slice_a is the collection of data
79+
// with 'education' equals 'low', and slice_b is the collection of data with
80+
// 'education' equals 'high'.
81+
ModelEvaluationSlice.Slice.SliceSpec bias_slices = 1;
82+
83+
// Positive labels selection on the target field.
84+
repeated string labels = 2;
85+
}
86+
5487
// Output only. The resource name of the ModelEvaluation.
5588
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
5689

@@ -94,4 +127,7 @@ message ModelEvaluation {
94127
// structured value with keys of "pipeline_job_id", "evaluation_dataset_type",
95128
// "evaluation_dataset_path".
96129
google.protobuf.Value metadata = 11;
130+
131+
// Specify the configuration for bias detection.
132+
BiasConfig bias_configs = 12;
97133
}

packages/google-cloud-aiplatform/protos/protos.d.ts

Lines changed: 109 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)