Skip to main content

slices

Creates, updates, deletes, gets or lists a slices resource.

Overview

Nameslices
TypeResource
Idgoogle.aiplatform.slices

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The resource name of the ModelEvaluationSlice.
createTimestring (google-datetime)Output only. Timestamp when this ModelEvaluationSlice was created.
metricsanyOutput only. Sliced evaluation metrics of the Model. The schema of the metrics is stored in metrics_schema_uri
metricsSchemaUristringOutput only. Points to a YAML file stored on Google Cloud Storage describing the metrics of this ModelEvaluationSlice. The schema is defined as an OpenAPI 3.0.2 Schema Object.
modelExplanationobjectOutput only. 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 tabular Models. (id: GoogleCloudAiplatformV1ModelExplanation)
sliceobjectOutput only. The slice of the test data that is used to evaluate the Model. (id: GoogleCloudAiplatformV1ModelEvaluationSliceSlice)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, modelsId, evaluationsId, slicesIdGets a ModelEvaluationSlice.
listselectprojectsId, locationsId, modelsId, evaluationsIdfilter, pageSize, pageToken, readMaskLists ModelEvaluationSlices in a ModelEvaluation.
batch_importexecprojectsId, locationsId, modelsId, evaluationsId, slicesIdImports a list of externally generated EvaluatedAnnotations.

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
evaluationsIdstring
locationsIdstring
modelsIdstring
projectsIdstring
slicesIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
readMaskstring (google-fieldmask)

SELECT examples

Gets a ModelEvaluationSlice.

SELECT
name,
createTime,
metrics,
metricsSchemaUri,
modelExplanation,
slice
FROM google.aiplatform.slices
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND modelsId = '{{ modelsId }}' -- required
AND evaluationsId = '{{ evaluationsId }}' -- required
AND slicesId = '{{ slicesId }}' -- required;

Lifecycle Methods

Imports a list of externally generated EvaluatedAnnotations.

EXEC google.aiplatform.slices.batch_import 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@modelsId='{{ modelsId }}' --required,
@evaluationsId='{{ evaluationsId }}' --required,
@slicesId='{{ slicesId }}' --required
@@json=
'{
"evaluatedAnnotations": "{{ evaluatedAnnotations }}"
}';