Class GoogleCloudAiplatformV1DatasetCustomMetric
Defines a custom dataset-level aggregation.
Implements
Inherited Members
Namespace: Google.Apis.Aiplatform.v1.Data
Assembly: Google.Apis.Aiplatform.v1.dll
Syntax
public class GoogleCloudAiplatformV1DatasetCustomMetric : IDirectResponseSchema
Properties
AggregationFunction
Required. The Python code string containing the aggregation function. Expected function signature: def aggregate(instances: list[dict[str, Any]]) -> dict[str, float]: The instances argument is a list
of dictionaries, where each dictionary represents a single evaluation result item. The structure of each
dictionary corresponds to the fields in the EvaluationResult message. This includes: - "request":
Contains the original input data and model inputs (from EvaluationResult.EvaluationRequest). -
"candidate_results": Contains the results of any instance-level metrics (from
EvaluationResult.CandidateResults). Example of a single item in the instances list: { "request": {
"prompt": {"text": "What is the capital of France?"}, "golden_response": {"text": "Paris"},
"candidate_responses": [{"candidate": "model-v1", "text": "Paris"}] }, "candidate_results": [ {"metric":
"exact_match", "score": 1.0}, {"metric": "bleu", "score": 0.9} ] }
Declaration
[JsonProperty("aggregationFunction")]
public virtual string AggregationFunction { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DisplayName
Optional. A display name for this custom summary metric. Used to prefix keys in the output summaryMetrics map. If not provided, a default name like "dataset_custom_metric_1", "dataset_custom_metric_2", etc., will be generated based on the order in the repeated field.
Declaration
[JsonProperty("displayName")]
public virtual string DisplayName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
| Type | Description |
|---|---|
| string |