VertexAIIndex
Property | Value |
---|---|
Google Cloud Service Name | Vertex AI |
Google Cloud Service Documentation | /vertex-ai/docs |
Google Cloud REST Resource Name | v1beta1.projects.locations.indexes |
Google Cloud REST Resource Documentation | /vertex-ai/docs/reference/rest/v1beta1/projects.locations.indexes |
Config Connector Resource Short Names | gcpvertexaiindex gcpvertexaiindexes vertexaiindex |
Config Connector Service Name | aiplatform.googleapis.com |
Config Connector Resource Fully Qualified Name | vertexaiindexes.vertexai.cnrm.cloud.google.com |
Can Be Referenced by IAMPolicy/IAMPolicyMember | No |
Config Connector Default Average Reconcile Interval In Seconds | 600 |
Custom Resource Definition Properties
Spec
Schema
description: string
displayName: string
indexUpdateMethod: string
metadata:
config:
algorithmConfig:
bruteForceConfig: {}
treeAhConfig:
leafNodeEmbeddingCount: integer
leafNodesToSearchPercent: integer
approximateNeighborsCount: integer
dimensions: integer
distanceMeasureType: string
featureNormType: string
shardSize: string
contentsDeltaUri: string
projectRef:
external: string
name: string
namespace: string
region: string
resourceID: string
Fields | |
---|---|
Optional |
The description of the Index. |
Required |
The display name of the Index. The name can be up to 128 characters long and can consist of any UTF-8 characters. |
Optional |
Immutable. The update method to use with this Index. The value must be the followings. If not set, BATCH_UPDATE will be used by default. * BATCH_UPDATE: user can call indexes.patch with files on Cloud Storage of datapoints to update. * STREAM_UPDATE: user can call indexes.upsertDatapoints/DeleteDatapoints to update the Index and the updates will be applied in corresponding DeployedIndexes in nearly real-time. |
Optional |
An additional information about the Index. |
Optional |
Immutable. The configuration of the Matching Engine Index. |
Optional |
The configuration with regard to the algorithms used for efficient search. |
Optional |
Configuration options for using brute force search, which simply implements the standard linear search in the database for each query. |
Optional |
Configuration options for using the tree-AH algorithm (Shallow tree + Asymmetric Hashing). Please refer to this paper for more details: https://arxiv.org/abs/1908.10396. |
Optional |
Number of embeddings on each leaf node. The default value is 1000 if not set. |
Optional |
The default percentage of leaf nodes that any query may be searched. Must be in range 1-100, inclusive. The default value is 10 (means 10%) if not set. |
Optional |
The default number of neighbors to find via approximate search before exact reordering is performed. Exact reordering is a procedure where results returned by an approximate search algorithm are reordered via a more expensive distance computation. Required if tree-AH algorithm is used. |
Required* |
The number of dimensions of the input vectors. |
Optional |
The distance measure used in nearest neighbor search. The value must be one of the followings: * SQUARED_L2_DISTANCE: Euclidean (L_2) Distance * L1_DISTANCE: Manhattan (L_1) Distance * COSINE_DISTANCE: Cosine Distance. Defined as 1 - cosine similarity. * DOT_PRODUCT_DISTANCE: Dot Product Distance. Defined as a negative of the dot product. |
Optional |
Type of normalization to be carried out on each vector. The value must be one of the followings: * UNIT_L2_NORM: Unit L2 normalization type * NONE: No normalization type is specified. |
Optional |
Immutable. Index data is split into equal parts to be processed. These are called "shards". The shard size must be specified when creating an index. The value must be one of the followings: * SHARD_SIZE_SMALL: Small (2GB) * SHARD_SIZE_MEDIUM: Medium (20GB) * SHARD_SIZE_LARGE: Large (50GB). |
Optional |
Allows creating or replacing the contents of the Matching Engine Index. When being updated, the existing content of the Index will be replaced by the data from the latest contentsDeltaUri. The string must be a valid Cloud Storage directory path. If this field is set when calling IndexService.UpdateIndex, then no other Index field can be also updated as part of the same call. The expected structure and format of the files this URI points to is described at https://cloud.google.com/vertex-ai/docs/matching-engine/using-matching-engine#input-data-format. |
Required |
The project that this resource belongs to. |
Optional |
Allowed value: The `name` field of a `Project` resource. |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Required |
Immutable. The region of the index. eg us-central1. |
Optional |
Immutable. Optional. The service-generated name of the resource. Used for acquisition only. Leave unset to create a new resource. |
* Field is required when parent field is specified
Status
Schema
conditions:
- lastTransitionTime: string
message: string
reason: string
status: string
type: string
observedGeneration: integer
observedState:
createTime: string
indexStats:
- shardsCount: integer
vectorsCount: string
metadataSchemaUri: string
name: string
Fields | |
---|---|
conditions |
Conditions represent the latest available observation of the resource's current state. |
conditions[] |
|
conditions[].lastTransitionTime |
Last time the condition transitioned from one status to another. |
conditions[].message |
Human-readable message indicating details about last transition. |
conditions[].reason |
Unique, one-word, CamelCase reason for the condition's last transition. |
conditions[].status |
Status is the status of the condition. Can be True, False, Unknown. |
conditions[].type |
Type is the type of the condition. |
observedGeneration |
ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. |
observedState |
The observed state of the underlying GCP resource. |
observedState.createTime |
The timestamp of when the Index was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. |
observedState.indexStats |
Stats of the index resource. |
observedState.indexStats[] |
|
observedState.indexStats[].shardsCount |
The number of shards in the Index. |
observedState.indexStats[].vectorsCount |
The number of vectors in the Index. |
observedState.metadataSchemaUri |
Points to a YAML file stored on Google Cloud Storage describing additional information about the Index, that is specific to it. Unset if the Index does not have any additional information. |
observedState.name |
The resource name of the Index. |
Sample YAML(s)
Typical Use Case
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: vertexai.cnrm.cloud.google.com/v1beta1
kind: VertexAIIndex
metadata:
labels:
label-one: "value-one"
name: vertexaiindex-sample
spec:
displayName: "vertex AI index"
region: us-central1
description: "an example vertex AI index"
metadata:
# Replace ${KCC_VERTEX_AI_INDEX_TEST_DATA_URI?} with the Cloud Storage
# directory path to the files for inserting, updating or deleting the
# contents of the Matching Engine Index. For example,
# "gs://my-test-bucket/contents"
contentsDeltaUri: ${KCC_VERTEX_AI_INDEX_TEST_DATA_URI?}
config:
dimensions: 2
approximateNeighborsCount: 150
shardSize: "SHARD_SIZE_SMALL"
distanceMeasureType: "DOT_PRODUCT_DISTANCE"
algorithmConfig:
treeAhConfig:
leafNodeEmbeddingCount: 500
leafNodesToSearchPercent: 7
indexUpdateMethod: "BATCH_UPDATE"
projectRef:
# Replace ${PROJECT_ID?} with your project ID.
external: ${PROJECT_ID?}
---
# Replace ${PROJECT_NUMBER?} below with your desired project number.
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicyMember
metadata:
name: vertexaiindex-dep
spec:
memberFrom:
serviceIdentityRef:
name: vertexaiindex-dep
role: roles/storage.admin # required by vertex AI service agent to access test data
resourceRef:
apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucket
external: ${KCC_VERTEX_AI_INDEX_TEST_BUCKET?}
---
apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
kind: ServiceIdentity
metadata:
name: vertexaiindex-dep
annotations:
cnrm.cloud.google.com/deletion-policy: "abandon"
spec:
projectRef:
# Replace ${PROJECT_ID?} with your project ID.
external: ${PROJECT_ID?}
resourceID: aiplatform.googleapis.com