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

Error for dotproduct metric in PineconeDocumentStore #2493

Closed
1 task done
jamescalam opened this issue May 3, 2022 · 2 comments · Fixed by #2494
Closed
1 task done

Error for dotproduct metric in PineconeDocumentStore #2493

jamescalam opened this issue May 3, 2022 · 2 comments · Fixed by #2494

Comments

@jamescalam
Copy link
Contributor

Describe the bug
The PineconeDocumentStore consumes "dot_product" as a similarity metric, Pinecone consumes "dotproduct" as a metric, creating a mismatch and making dot product impossible to use.

Error message

ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'content-type': 'text/plain; charset=utf-8', 'content-length': '38', 'date': 'Tue, 03 May 2022 21:25:59 GMT', 'server': 'envoy', 'x-envoy-upstream-service-time': '1'})
HTTP response body: Metric 'dot_product' is not supported.

Expected behavior
"dot_product" metric should not raise error

Additional context
N/A

To Reproduce

from haystack.document_stores import PineconeDocumentStore

document_store = PineconeDocumentStore(
    api_key='<YOUR_API_KEY>',
    index='document',
    similarity="dot_product",
    embedding_dim=128
)

FAQ Check

System:

  • OS: Mac
  • GPU/CPU: CPU
  • Haystack version (commit or version number): 1.3.0
  • DocumentStore: PineconeDocumentStore
  • Reader: N/A
  • Retriever: N/A
@jamescalam
Copy link
Contributor Author

I will be submitting a PR to fix soon

@jamescalam jamescalam mentioned this issue May 3, 2022
4 tasks
@jamescalam
Copy link
Contributor Author

Above PR should solve the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant