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

Standardize Finder, Readers, and Retriever interfaces #62

Merged
merged 8 commits into from
Apr 16, 2020

Conversation

tanaysoni
Copy link
Contributor

This PR makes the following changes:

Retriever-Reader Interface

  • in the current implementation, Retrievers return a list of texts and their associated meta_data. This PR introduces a Document schema that encapsulates documents and their meta_data. It simplifies the Retriever-Reader pipeline since now Retrievers only need to return a list of Document.

Simplify IDs

  • the document_id field(Document.id) is now the _id field from ES
  • external_source_id is added to identify the source file for the case when a large file is split across multiple ES documents.

Code Style

  • introduce Pydantic and Python type hints

@tanaysoni tanaysoni requested a review from tholor April 15, 2020 16:05
@tanaysoni tanaysoni changed the title WIP: Standardize Finder, Readers, and Retriever interfaces Standardize Finder, Readers, and Retriever interfaces Apr 16, 2020
Copy link
Member

@tholor tholor left a comment

Choose a reason for hiding this comment

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

Looking great. Just minor comment about doc string.

haystack/finder.py Outdated Show resolved Hide resolved
@tanaysoni tanaysoni merged commit b5fa084 into master Apr 16, 2020
@tanaysoni tanaysoni deleted the refactor-retriver branch July 8, 2020 08:37
masci pushed a commit that referenced this pull request Nov 27, 2023
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 this pull request may close these issues.

2 participants