Skip to main content

evaluation_metrics

Creates, updates, deletes, gets or lists an evaluation_metrics resource.

Overview

Nameevaluation_metrics
TypeResource
Idgoogle.aiplatform.evaluation_metrics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. The resource name of the EvaluationMetric. Format: projects/{project}/locations/{location}/evaluationMetrics/{evaluation_metric}
createTimestring (google-datetime)Output only. The time when the EvaluationMetric was created.
descriptionstringOptional. A description of the EvaluationMetric.
displayNamestringRequired. The user-friendly display name for the EvaluationMetric.
encryptionSpecobjectOptional. Customer-managed encryption key spec for this EvaluationMetric. If set, this EvaluationMetric will be secured by this key. (id: GoogleCloudAiplatformV1EncryptionSpec)
gcsUristringOptional. The Google Cloud Storage URI that stores the metric specification..
labelsobjectOptional. Labels for the evaluation metric.
metricobjectOptional. The metric configuration. Only LLMMetric and CustomCodeExecutionMetric are supported. (id: GoogleCloudAiplatformV1Metric)
updateTimestring (google-datetime)Output only. The time when the EvaluationMetric was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, evaluationMetricsIdGets an EvaluationMetric.
listselectprojectsId, locationsIdpageToken, orderBy, filter, pageSizeLists EvaluationMetrics.
createinsertprojectsId, locationsIdevaluationMetricIdCreates an EvaluationMetric.
deletedeleteprojectsId, locationsId, evaluationMetricsIdDeletes an EvaluationMetric.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
evaluationMetricsIdstring
locationsIdstring
projectsIdstring
evaluationMetricIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets an EvaluationMetric.

SELECT
name,
createTime,
description,
displayName,
encryptionSpec,
gcsUri,
labels,
metric,
updateTime
FROM google.aiplatform.evaluation_metrics
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND evaluationMetricsId = '{{ evaluationMetricsId }}' -- required
;

INSERT examples

Creates an EvaluationMetric.

INSERT INTO google.aiplatform.evaluation_metrics (
data__metric,
data__labels,
data__gcsUri,
data__name,
data__encryptionSpec,
data__description,
data__displayName,
projectsId,
locationsId,
evaluationMetricId
)
SELECT
'{{ metric }}',
'{{ labels }}',
'{{ gcsUri }}',
'{{ name }}',
'{{ encryptionSpec }}',
'{{ description }}',
'{{ displayName }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ evaluationMetricId }}'
RETURNING
name,
createTime,
description,
displayName,
encryptionSpec,
gcsUri,
labels,
metric,
updateTime
;

DELETE examples

Deletes an EvaluationMetric.

DELETE FROM google.aiplatform.evaluation_metrics
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND evaluationMetricsId = '{{ evaluationMetricsId }}' --required
;