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

refactor: TableReader #3456

Merged
merged 24 commits into from
Oct 26, 2022
Merged

refactor: TableReader #3456

merged 24 commits into from
Oct 26, 2022

Conversation

sjrl
Copy link
Contributor

@sjrl sjrl commented Oct 24, 2022

Related Issues

Proposed Changes:

I refactored the TableReader class to make it easier to address issue #1723, which will be solved by either supporting a new table encoder or by implementing a sliding window approach. There will be a follow-up PR to finish solving issue #1723.

  • Refactoring of TableReader class to work similarly to the EmbeddingRetriever class where we can more easily swap out different table encoders.
  • Updated the tests to explicitly test the TapasForScoredQA architecture.
  • Updated the tests to use a smaller tapas model where possible to increase the speed of the tests.

How did you test it?

The API for loading a TableReader has not changed so existing unit and integration tests all pass.

Notes for the reviewer

@bogdankostic I'd appreciate a review of this refactor since I'm changing your original implementation. Please let me know if you have any comments or concerns.

Checklist

@sjrl sjrl requested a review from a team as a code owner October 24, 2022 09:10
@sjrl sjrl requested review from julian-risch and bogdankostic and removed request for a team October 24, 2022 09:10
@sjrl sjrl changed the title Table qa improvements refactor: TableReader Oct 24, 2022
@ZanSara ZanSara added topic:tableQA topic:reader type:refactor Not necessarily visible to the users labels Oct 24, 2022
@julian-risch julian-risch removed their request for review October 25, 2022 09:42
@julian-risch
Copy link
Member

julian-risch commented Oct 25, 2022

The auto-assignment of reviewers added me here but I agree with Sebastian that Bogdan is the best person to review this PR. Therefore, I unassigned myself. Just let me know if you need a second opinion on the PR. My highlight of this PR are the smaller tapas models in the tests. Thanks for speeding them up! 👍

Copy link
Contributor

@bogdankostic bogdankostic left a comment

Choose a reason for hiding this comment

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

Thanks for this PR, looks very good already :) I only left two minor suggestions

haystack/nodes/reader/table.py Outdated Show resolved Hide resolved
haystack/nodes/reader/table.py Outdated Show resolved Hide resolved
Copy link
Contributor

@bogdankostic bogdankostic left a comment

Choose a reason for hiding this comment

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

LGTM, just one very small nitpick :)

haystack/nodes/reader/table.py Show resolved Hide resolved
@sjrl sjrl merged commit 8db7dfb into main Oct 26, 2022
@sjrl sjrl deleted the table-qa-improvements branch October 26, 2022 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:reader topic:tableQA type:refactor Not necessarily visible to the users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants