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

feat: InMemoryDocumentStore serialization #7888

Conversation

davidberenstein1957
Copy link
Contributor

@davidberenstein1957 davidberenstein1957 commented Jun 18, 2024

Related Issues

Proposed Changes:

Added two save_to_disk and load_from_disk functions.

How did you test it?

Added a test test_save_to_disk_and_load_from_disk

Notes for the reviewer

The test has an issue due to cls.from_dict methods somehow caching InMemoryDocumentStore.values(). I added an overwrite policy to avoid this but it is not the cleanest way. Not sure what is happening.

Checklist

@davidberenstein1957 davidberenstein1957 requested a review from a team as a code owner June 18, 2024 18:24
@davidberenstein1957 davidberenstein1957 requested review from davidsbatista and removed request for a team June 18, 2024 18:24
@github-actions github-actions bot added topic:tests type:documentation Improvements on the docs labels Jun 18, 2024
@davidberenstein1957 davidberenstein1957 requested a review from a team as a code owner June 18, 2024 18:32
@davidberenstein1957 davidberenstein1957 requested review from dfokina and removed request for a team June 18, 2024 18:32
@coveralls
Copy link
Collaborator

coveralls commented Jun 18, 2024

Pull Request Test Coverage Report for Build 9570546368

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 8 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 89.86%

Files with Coverage Reduction New Missed Lines %
document_stores/in_memory/document_store.py 8 97.35%
Totals Coverage Status
Change from base Build 9568480998: -0.01%
Covered Lines: 6974
Relevant Lines: 7761

💛 - Coveralls

Copy link
Contributor

@davidsbatista davidsbatista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@davidsbatista
Copy link
Contributor

thanks for your contribution @davidberenstein1957 appreciated! 👍🏽

@davidsbatista davidsbatista merged commit 08104e0 into deepset-ai:main Jun 21, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:tests type:documentation Improvements on the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: implement serialization for InMemoryDocumentStore
3 participants