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

DocumentStore deserialiation with from_dict creates a new class instead of calling from_dict on the DocumentStore #8204

Closed
1 task
FHardow opened this issue Aug 12, 2024 · 0 comments · Fixed by #8207
Assignees
Labels
type:bug Something isn't working

Comments

@FHardow
Copy link
Member

FHardow commented Aug 12, 2024

Describe the bug
Components that deserialize a document store through to_dict do not call from_dict on the document store, but create a new instance of it. That can be wrong if the functionality differs.
We found that problem while testing out the new IAM workflow in the OpenSearch integration together with a basic component.
The OpenSearch components don't have that problems because they are calling the DocumentStore directly.
Link can be found below.

Affected components are:

  • SentenceWindowRetriever
  • CacheChecker
  • FilterRetriever

Please double check this list, it was only a quick code search from my side.

Error message
No error message thrown, only found that problem while testing the IAM opensearch setup.

Expected behavior
Components that serialize a document store should also deserialize it correctly.

Additional context
Test setup that shows that a serialized OpenSearch document store is not deserialized correctly:
deepset-ai/haystack-core-integrations#972

To Reproduce
Steps to reproduce the behavior

FAQ Check

System:

  • OS: Arch Linux / Ubuntu on EC2
  • GPU/CPU: /
  • Haystack version (commit or version number): 2.3.1
  • DocumentStore: OpenSearch
  • Reader:
  • Retriever: SentenceWindowRetriever or CacheChecker or FilterRetriever or others
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants