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

[Bug] delete_all index is not working. #311

Open
2 tasks done
ARajgor opened this issue Feb 14, 2024 · 3 comments
Open
2 tasks done

[Bug] delete_all index is not working. #311

ARajgor opened this issue Feb 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@ARajgor
Copy link

ARajgor commented Feb 14, 2024

Is this a new bug in the Pinecone Python client?

  • I believe this is a new bug in the Pinecone Python Client
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

I want to delete all the vector embeddings from the default namespace. I tried to follow the official documentation. I ran the code and it returned the empty string { } as expected but the vectors didn't got deleted from the pod. When I tried to run again index.describe_index_state() it shows all the indexes that are present.

Expected Behavior

It should remove all the vectors from the pods also. The request's response is an empty string but vectors aren't deleted.

Steps To Reproduce

Here is my code,

from pinecone import Pinecone

pc = Pinecone(api_key=os.getenv("PINECONE_API_KEY"))

index = pc.Index(<index-name>)

print(index.describe_index_stats())

print(index.delete(delete_all=True))

Relevant log output

No response

Environment

- OS: Windows 11
- Python: 3.11.4
- pinecone: 3.0.2

Additional Context

No response

@ARajgor ARajgor added the bug Something isn't working label Feb 14, 2024
@daverigby
Copy link
Contributor

Note that delete(delete_all=True only deletes the vectors in the specified namespace (defaults to the default namespace). Indeed, I see the expected behaviour when I have two namespaces - default and ns_2 and call delete(delete_all=True):

>>> import pinecone
>>> pinecone.__version__
'3.0.2'
>>> pc = pinecone.Pinecone(api_key=my_api_key)
>>> index = pc.Index(host=my_index)
>>> index.describe_index_stats()
{'dimension': 4,
 'index_fullness': 0.0,
 'namespaces': {'': {'vector_count': 2}, 'ns_2': {'vector_count': 2}},
 'total_vector_count': 4}
>>> index.delete(delete_all=True)
{}
>>> index.describe_index_stats()
{'dimension': 4,
 'index_fullness': 0.0,
 'namespaces': {'ns_2': {'vector_count': 2}},
 'total_vector_count': 2}

Could you confirm what namespace(s) your data is stored in?

@ARajgor
Copy link
Author

ARajgor commented Feb 15, 2024

currently, I only use the default namespace so I guess there is no need to pass the namespace.

See I run this cell and it respond with empty {}.
image

but in pinecode dashboard vectors are still present.
image
image

@ARajgor
Copy link
Author

ARajgor commented Feb 18, 2024

Today I got a new error, namespace is not found. namespace parameter is optional for the default namespace.
I'm getting the same error in the curl request too.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants