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

fix: document joiner division by zero with distribution based rank fusion #8520

Conversation

AnesBenmerzoug
Copy link
Contributor

@AnesBenmerzoug AnesBenmerzoug commented Nov 6, 2024

Related Issues

Proposed Changes:

  • This PR fixes an issue with the distribution based rank fusion join mode of the DocumentJoiner class when an empty list of documents is passed.
  • It additionally fixes division by zero errors when no document list is passed to the merge and rrf join modes.

How did you test it?

  • Locally by running hatch test -- test/components/joiners/test_document_joiner.py

Checklist

@AnesBenmerzoug AnesBenmerzoug requested a review from a team as a code owner November 6, 2024 21:25
@AnesBenmerzoug AnesBenmerzoug requested review from silvanocerza and removed request for a team November 6, 2024 21:25
@CLAassistant
Copy link

CLAassistant commented Nov 6, 2024

CLA assistant check
All committers have signed the CLA.

@silvanocerza silvanocerza requested a review from a team as a code owner November 14, 2024 11:28
@silvanocerza silvanocerza requested review from dfokina and removed request for a team November 14, 2024 11:28
Copy link
Contributor

@silvanocerza silvanocerza left a comment

Choose a reason for hiding this comment

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

Nice PR, thanks! 🙏

@silvanocerza silvanocerza enabled auto-merge (squash) November 14, 2024 11:31
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 11836294015

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 90.184%

Totals Coverage Status
Change from base Build 11799929241: 0.007%
Covered Lines: 7782
Relevant Lines: 8629

💛 - Coveralls

@silvanocerza silvanocerza merged commit f5683bc into deepset-ai:main Nov 14, 2024
18 checks passed
@AnesBenmerzoug AnesBenmerzoug deleted the fix/document-joiner-division-by-zero branch November 14, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants