Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vertexai): support shard_size in google_vertex_ai_index #8293

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions mmv1/products/vertexai/Index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ properties:
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.
- !ruby/object:Api::Type::String
name: 'shardSize'
description: |-
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)
default_from_api: true
shotarok marked this conversation as resolved.
Show resolved Hide resolved
- !ruby/object:Api::Type::String
name: 'distanceMeasureType'
description: |-
Expand Down
1 change: 1 addition & 0 deletions mmv1/templates/terraform/examples/vertex_ai_index.tf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ resource "google_vertex_ai_index" "index" {
config {
dimensions = 2
approximate_neighbors_count = 150
shard_size = "SHARD_SIZE_SMALL"
distance_measure_type = "DOT_PRODUCT_DISTANCE"
algorithm_config {
tree_ah_config {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ resource "google_vertex_ai_index" "index" {
contents_delta_uri = "gs://${google_storage_bucket.bucket.name}/contents"
config {
dimensions = 2
shard_size = "SHARD_SIZE_LARGE"
distance_measure_type = "COSINE_DISTANCE"
feature_norm_type = "UNIT_L2_NORM"
algorithm_config {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ resource "google_vertex_ai_index" "index" {
config {
dimensions = 2
approximate_neighbors_count = 150
shard_size = "SHARD_SIZE_SMALL"
distance_measure_type = "DOT_PRODUCT_DISTANCE"
algorithm_config {
tree_ah_config {
Expand Down Expand Up @@ -145,6 +146,7 @@ resource "google_vertex_ai_index" "index" {
config {
dimensions = 2
approximate_neighbors_count = 150
shard_size = "SHARD_SIZE_SMALL"
distance_measure_type = "DOT_PRODUCT_DISTANCE"
algorithm_config {
tree_ah_config {
Expand Down