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

bug: reactivate benchmarks with quick fixes #2766

Merged
merged 14 commits into from
Sep 20, 2022
Merged

bug: reactivate benchmarks with quick fixes #2766

merged 14 commits into from
Sep 20, 2022

Conversation

tholor
Copy link
Member

@tholor tholor commented Jul 6, 2022

Related Issue(s): fixes #2813
In the past we were running benchmarks quite regularly for haystack and published results here. As the benchmarking script was not working anymore at some point, we stopped doing it and never found time to fix it. ​

Proposed changes:

  • Update readme for benchmarks
  • Adjust benchmark scripts to new document primitives (text -> content)
  • Enable logging again
  • Updating the set of models used in benchmarking to more "popular ones"
  • Fresh benchmarks results for the latest main branch (c5a2651)

Future work

  • Refactoring/cleaning up the code + any automated execution of it
  • Benchmark pipelines rather than "individual nodes"
  • Remove DPR from the benchmarks and go all for "sentence transformers" (?)
  • Add a deberta reader model to the benchmarks
  • Automatically allocate more memory to elastic/opensearch containers for 500k runs (only manual work around for now)

Note
In order to successfully finish the 500k indexing runs on elastic + opensearch the docker containers we need to allocate more RAM. The default cmds used in haystack's utils launch_opensearch() and launch_es() are not sufficient here. This means we need to start the two containers manually before running the benchmarks. Documented this in the benchmarks' README, but would be nice to automate this (e.g. by exposing the memory param in the util functions and passing a value from benchmarks).

Pre-flight checklist

@tholor tholor marked this pull request as ready for review September 19, 2022 07:15
@tholor tholor requested review from a team as code owners September 19, 2022 07:15
@tholor tholor requested review from bogdankostic and removed request for a team September 19, 2022 07:15
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, one last step before merging would be to change the title such that it complies with the commit conventions.

@tholor tholor added the type:bug Something isn't working label Sep 20, 2022
@tholor tholor changed the title Quickfix benchmarks bug: reactivate benchmarks with quick fixes Sep 20, 2022
@tholor tholor merged commit 7e79a48 into main Sep 20, 2022
@tholor tholor deleted the quickfix_benchmarks branch September 20, 2022 08:22


To run all benchmarks (e.g. for a new haystack release):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
To run all benchmarks (e.g. for a new haystack release):
To start all benchmarks (e.g. for a new Haystack release), run:


Results will be stored in this directory as
- retriever_index_results.csv (+ .md)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- retriever_index_results.csv (+ .md)
- retriever_index_results.csv and retriever_index_results.md

Results will be stored in this directory as
- retriever_index_results.csv (+ .md)
- retriever_query_results.csv (+ .md)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- retriever_query_results.csv (+ .md)
- retriever_query_results.csv and retriever_query_results.md

- retriever_index_results.csv (+ .md)
- retriever_query_results.csv (+ .md)
- reader_results.csv (+ .md)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- reader_results.csv (+ .md)
- reader_results.csv and reader_results.md


`docker start opensearch > /dev/null 2>&1 || docker run -d -p 9201:9200 -p 9600:9600 -e "discovery.type=single-node" -e "OPENSEARCH_JAVA_OPTS=-Xms4096m -Xmx4096m" --name opensearch opensearchproject/opensearch:2.2.1`
and
Copy link
Contributor

Choose a reason for hiding this comment

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

Having a line break either side of this "and" will make the paragraph be much more readable

brandenchan pushed a commit that referenced this pull request Sep 21, 2022
* quick fix benchmark runs to make them work with current haystack version

* fix minor typo

* update readme. fix minor things to make benchmarks run again

* Update Documentation & Code Style

* fix typo in readme

* update result files for reader and retriever querying

* reduce batch size for update embeddings to prevent xlarge bulk_update requests that exceed elastic's limits (happening in dense 500k runs)

* change default memory allocation back to normal. add note to readme

* add first indexing results

* add memory to docker cmd

* full benchmarks results on commit  c5a2651

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix benchmark script and update the readme page with latest results
3 participants