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] Cannot set attribute in Pinecone Vector Store #256

Closed
20001LastOrder opened this issue Dec 7, 2023 · 3 comments · Fixed by #276
Closed

[BUG] Cannot set attribute in Pinecone Vector Store #256

20001LastOrder opened this issue Dec 7, 2023 · 3 comments · Fixed by #276
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@20001LastOrder
Copy link
Collaborator

Describe the bug
The vectorstore based on Pinecone will fail due to cannot set attribute error

To Reproduce
Steps to reproduce the behavior:

  1. Add Pinecone related keys to the .env file
  2. Run pytest in the src folder
  3. Multiple tests will fail due to the following error
    def __init__(self, namespace, db, embeddings, text_key):
        self.db = db
        self.namespace = namespace
>       self.embeddings = embeddings
E       AttributeError: can't set attribute

sherpa_ai\connectors\vectorstores.py:24: AttributeError

Expected behavior
These tests should pass

Screenshots
image

Additional context
After a bit dig in, I found that LangChain updated their VectorStore API and now embedding is a property function as following

 @property
    def embeddings(self) -> Optional[Embeddings]:
        """Access the query embedding object if available."""
        logger.debug(
            f"{Embeddings.__name__} is not implemented for {self.__class__.__name__}"
        )
        return None

So we need to change our inheritance accordingly, maybe by overriding this function.

@oshoma
Copy link
Collaborator

oshoma commented Jan 9, 2024

OK. The bug and failing test are unrelated to this PR, then?

@20001LastOrder
Copy link
Collaborator Author

OK. The bug and failing test are unrelated to this PR, then?

Yes, and it will be solved separately.

@oshoma
Copy link
Collaborator

oshoma commented Jan 9, 2024 via email

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

Successfully merging a pull request may close this issue.

2 participants