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: Add reader-retriever benchmark script #5006

Merged
merged 29 commits into from
May 26, 2023

Conversation

bogdankostic
Copy link
Contributor

@bogdankostic bogdankostic commented May 23, 2023

Related Issues

Related PRs

Proposed Changes:

This PR adds a file benchmarks/retriever_reader.py that allows to run benchmarks on a retriever-reader Pipeline by providing an indexing pipeline, a querying pipeline, and an evaluation set.

How did you test it?

Manual tests.

Notes for the reviewer

We use run_batch instead of eval_batch methods as measuring the time of eval isn’t representative for pure inference speed because it creates a significant overhead.

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes
  • I added tests that demonstrate the correct behavior of the change
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test:.
  • I documented my code
  • I ran pre-commit hooks and fixed any issue

@coveralls
Copy link
Collaborator

coveralls commented May 23, 2023

Pull Request Test Coverage Report for Build 5089467124

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 39.621%

Totals Coverage Status
Change from base Build 5089433768: 0.0%
Covered Lines: 8876
Relevant Lines: 22402

💛 - Coveralls

@rjanjua
Copy link
Contributor

rjanjua commented May 25, 2023

When trying to run this benchmarl I get the following error:

Traceback (most recent call last):
  File "/Users/rohan/repos/deepset/haystack/test/benchmarks/run.py", line 8, in <module>
    from reader import benchmark_reader
  File "/Users/rohan/repos/deepset/haystack/test/benchmarks/reader.py", line 1, in <module>
    from utils import get_document_store, index_to_doc_store, get_reader
ImportError: cannot import name 'get_document_store' from 'utils' (/Users/rohan/repos/deepset/haystack/test/benchmarks/utils.py)

@bogdankostic
Copy link
Contributor Author

@rjanjua I merged #5004 and #5005 into this PR's branch, can you try again?

@rjanjua
Copy link
Contributor

rjanjua commented May 25, 2023

@bogdankostic I have a new error for you now 😄

  File "/Users/rohan/repos/deepset/haystack/test/benchmarks/run.py", line 9, in <module>
    from utils import load_config
ImportError: cannot import name 'load_config' from 'utils' (/Users/rohan/repos/deepset/haystack/test/benchmarks/utils.py)

@bogdankostic bogdankostic marked this pull request as ready for review May 26, 2023 09:45
@bogdankostic bogdankostic requested a review from a team as a code owner May 26, 2023 09:45
@bogdankostic bogdankostic requested review from julian-risch and vblagoje and removed request for a team and julian-risch May 26, 2023 09:45
@bogdankostic bogdankostic merged commit 5633446 into main May 26, 2023
@bogdankostic bogdankostic deleted the adapt_reader-retriever_benchmarks branch May 26, 2023 11:54
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.

4 participants