Determine this is the right repository
Summary of the issue
When running the quickstart example of vector search version 2 colab https://colab.research.google.com/github/GoogleCloudPlatform/generative-ai/blob/main/embeddings/vector-search-quickstart.ipynb
a collection is created.
The notebooks falsely prints at the end that this collection is deleted, like this
# Delete the Collection (and all Data Objects inside it) request = vectorsearch_v1beta.DeleteCollectionRequest( name=f"projects/{PROJECT_ID}/locations/{LOCATION}/collections/{collection_id}" ) vector_search_service_client.delete_collection(request) print(f"🗑️ Deleted Collection: {collection_id}") print(" All Data Objects in the Collection have been deleted as well.") print("\n✅ Cleanup complete! All Vector Search 2.0 resources have been deleted.")
It never looks the actual result up, like in the doc
https://docs.cloud.google.com/vertex-ai/docs/vector-search-2/collections/collections#deleting_a_collection
operation.result()
When running for the result, one can see that the collection is not deleted, the request fails with
FailedPrecondition: 400 Invalid resource state for "projects/xxx": Collection deletion is not allowed because it still has data objects. 9: Invalid resource state for "projects/xxx": Collection deletion is not allowed because it still has data objects.
, which is not documented behaviour, the notebook even says this cmd should delete all objects in the collection.
Current doc for deleting objects doc is not documenting how do batch delete all points.
The api auto doc does not name any forcing parameters for delete collection request doc .
The api auto doc for batch delete objects doc does not describe the request object , but it looks impossible to delete all at once: “A maximum of 1000 DataObjects can be deleted in a batch.”. This suggests that one has to collect all ids first and delete in many batches….
The link to github issues in the notebook goes to nowhere https://github.com/googleapis/python-vector-search/issues
How to delete a collection with objects?
API client name and version
google-cloud-vectorsearch >= 0.7.0 , <= 0.9.0
Reproduction steps: code
run the quickstart example of vector search version 2 colab https://colab.research.google.com/github/GoogleCloudPlatform/generative-ai/blob/main/embeddings/vector-search-quickstart.ipynb
to the end.
Modify the step where the collection is deleted to actually look the result of the operation up, like https://docs.cloud.google.com/vertex-ai/docs/vector-search-2/collections/collections#deleting_a_collection
Reproduction steps: supporting files
No response
Reproduction steps: actual results
FailedPrecondition: 400 Invalid resource state for "projects/xxx": Collection deletion is not allowed because it still has data objects. 9: Invalid resource state for "projects/xxx": Collection deletion is not allowed because it still has data objects.
Reproduction steps: expected results
200 success
OS & version + platform
No response
Python environment
No response
Python dependencies
No response
Additional context
No response
Determine this is the right repository
Summary of the issue
When running the quickstart example of vector search version 2 colab https://colab.research.google.com/github/GoogleCloudPlatform/generative-ai/blob/main/embeddings/vector-search-quickstart.ipynb
a collection is created.
The notebooks falsely prints at the end that this collection is deleted, like this
# Delete the Collection (and all Data Objects inside it) request = vectorsearch_v1beta.DeleteCollectionRequest( name=f"projects/{PROJECT_ID}/locations/{LOCATION}/collections/{collection_id}" ) vector_search_service_client.delete_collection(request) print(f"🗑️ Deleted Collection: {collection_id}") print(" All Data Objects in the Collection have been deleted as well.") print("\n✅ Cleanup complete! All Vector Search 2.0 resources have been deleted.")It never looks the actual result up, like in the doc
https://docs.cloud.google.com/vertex-ai/docs/vector-search-2/collections/collections#deleting_a_collection
operation.result()When running for the result, one can see that the collection is not deleted, the request fails with
FailedPrecondition: 400 Invalid resource state for "projects/xxx": Collection deletion is not allowed because it still has data objects. 9: Invalid resource state for "projects/xxx": Collection deletion is not allowed because it still has data objects., which is not documented behaviour, the notebook even says this cmd should delete all objects in the collection.
Current doc for deleting objects doc is not documenting how do batch delete all points.
The api auto doc does not name any forcing parameters for delete collection request doc .
The api auto doc for batch delete objects doc does not describe the request object , but it looks impossible to delete all at once: “A maximum of 1000 DataObjects can be deleted in a batch.”. This suggests that one has to collect all ids first and delete in many batches….
The link to github issues in the notebook goes to nowhere https://github.com/googleapis/python-vector-search/issues
How to delete a collection with objects?
API client name and version
google-cloud-vectorsearch >= 0.7.0 , <= 0.9.0
Reproduction steps: code
run the quickstart example of vector search version 2 colab https://colab.research.google.com/github/GoogleCloudPlatform/generative-ai/blob/main/embeddings/vector-search-quickstart.ipynb
to the end.
Modify the step where the collection is deleted to actually look the result of the operation up, like https://docs.cloud.google.com/vertex-ai/docs/vector-search-2/collections/collections#deleting_a_collection
Reproduction steps: supporting files
No response
Reproduction steps: actual results
FailedPrecondition: 400 Invalid resource state for "projects/xxx": Collection deletion is not allowed because it still has data objects. 9: Invalid resource state for "projects/xxx": Collection deletion is not allowed because it still has data objects.
Reproduction steps: expected results
200 success
OS & version + platform
No response
Python environment
No response
Python dependencies
No response
Additional context
No response