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: Add inference mode to ExtractiveReader #7699

Merged
merged 2 commits into from
May 15, 2024
Merged

Conversation

sjrl
Copy link
Contributor

@sjrl sjrl commented May 15, 2024

Related Issues

  • fixes #issue-number

Proposed Changes:

Adds inference mode to model call of the ExtractiveReader. This prevents gradients from being calculated during inference time in pytorch which saves on resources. This addition does not change the output of the model.

How did you test it?

Notes for the reviewer

Checklist

@sjrl sjrl requested a review from a team as a code owner May 15, 2024 13:37
@sjrl sjrl requested review from masci and removed request for a team May 15, 2024 13:37
@sjrl sjrl requested a review from a team as a code owner May 15, 2024 13:38
@sjrl sjrl requested review from dfokina and removed request for a team May 15, 2024 13:38
@sjrl
Copy link
Contributor Author

sjrl commented May 15, 2024

Hmm failing test looks like it's an error coming from coveralls

@wochinge
Copy link
Contributor

thank you! 😍

Copy link
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

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

LGTM!

@masci masci enabled auto-merge (squash) May 15, 2024 19:22
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 9096732862

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.001%) to 90.557%

Files with Coverage Reduction New Missed Lines %
components/readers/extractive.py 1 95.59%
Totals Coverage Status
Change from base Build 9095607887: 0.001%
Covered Lines: 6569
Relevant Lines: 7254

💛 - Coveralls

@masci masci merged commit af53e84 into main May 15, 2024
26 checks passed
@masci masci deleted the add-inf-mode-reader branch May 15, 2024 19:33
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.

4 participants