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

[chore] Add unittests for InformationRetrievalEvaluator #2838

Merged
merged 6 commits into from
Aug 29, 2024

Conversation

fpgmaas
Copy link
Contributor

@fpgmaas fpgmaas commented Jul 14, 2024

This PR does two things:

  • Add unit tests for InformationRetrievalEvaluator, raising its test coverage from 11% to 86%, and raising total coverage for the project from 50.7% to 53.3%.
  • Move the unit tests from test_evaluator.py to individual files in tests/evaluation, to mimic the directory structure in sentence_transformers and to easily allow running all tests for evaluators with pytest -s tests/evaluation.

Before

File Statements Missing Excluded Coverage
sentence_transformers/evaluation/InformationRetrievalEvaluator.py 211 188 0 11%

After

File Statements Missing Excluded Coverage
sentence_transformers/evaluation/InformationRetrievalEvaluator.py 211 30 0 86%

@tomaarsen
Copy link
Collaborator

Hello!

Apologies for the delay, I've been recovering from a surgery this last month.
Thanks a bunch for creating this test & splitting up the existing ones. I like the format a lot. This looks ready to go as far as I can tell :)

  • Tom Aarsen

@tomaarsen tomaarsen merged commit ef360c8 into UKPLab:master Aug 29, 2024
11 checks passed
@fpgmaas fpgmaas deleted the chore/test-information-retreival branch August 29, 2024 16:21
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