Add Distribution based rank fusion mode
Related Issues
- fixes #7914
Proposed Changes:
How it works:
from haystack import Document
from haystack.components.joiners.document_joiner import DocumentJoiner
joiner = DocumentJoiner(join_mode="distribution_based_rank_fusion")
documents_1 = [
Document(content="a", score=0.6),
Document(content="b", score=0.2),
Document(content="c", score=0.5),
]
documents_2 = [
Document(content="d", score=0.5),
Document(content="e", score=0.8),
Document(content="f", score=1.1, meta={"key": "value"}),
Document(content="g", score=0.3),
Document(content="a", score=0.3),
]
output = joiner.run([documents_1, documents_2])
# output
# [
# Document(content="a", score=0.66),
# Document(content="b", score=0.27),
# Document(content="c", score=0.56),
# Document(content="d", score=0.44),
# Document(content="e", score=0.60),
# Document(content="f", score=0.76, meta={"key": "value"}),
# Document(content="g", score=0.33),
# ]
How did you test it?
unit tests
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 unit tests and updated the docstrings
- 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
Pull Request Test Coverage Report for Build 9640102059
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+0.02%) to 89.967%
| Totals | |
|---|---|
| Change from base Build 9615573436: | 0.02% |
| Covered Lines: | 6734 |
| Relevant Lines: | 7485 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9661072521
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 2 unchanged lines in 2 files lost coverage.
- Overall coverage increased (+0.04%) to 89.988%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| components/evaluators/document_map.py | 1 | 96.15% |
| components/evaluators/document_mrr.py | 1 | 95.45% |
| <!-- | Total: | 2 |
| Totals | |
|---|---|
| Change from base Build 9615573436: | 0.04% |
| Covered Lines: | 6732 |
| Relevant Lines: | 7481 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9661187177
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 2 unchanged lines in 2 files lost coverage.
- Overall coverage increased (+0.04%) to 89.988%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| components/evaluators/document_map.py | 1 | 96.15% |
| components/evaluators/document_mrr.py | 1 | 95.45% |
| <!-- | Total: | 2 |
| Totals | |
|---|---|
| Change from base Build 9615573436: | 0.04% |
| Covered Lines: | 6732 |
| Relevant Lines: | 7481 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9662370077
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 2 unchanged lines in 2 files lost coverage.
- Overall coverage increased (+0.04%) to 89.988%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| components/evaluators/document_map.py | 1 | 96.15% |
| components/evaluators/document_mrr.py | 1 | 95.45% |
| <!-- | Total: | 2 |
| Totals | |
|---|---|
| Change from base Build 9615573436: | 0.04% |
| Covered Lines: | 6732 |
| Relevant Lines: | 7481 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9662495946
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+0.02%) to 89.988%
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.02% |
| Covered Lines: | 6732 |
| Relevant Lines: | 7481 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9662774178
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+0.02%) to 89.988%
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.02% |
| Covered Lines: | 6732 |
| Relevant Lines: | 7481 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9663666551
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+0.02%) to 89.988%
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.02% |
| Covered Lines: | 6732 |
| Relevant Lines: | 7481 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9744328004
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 39 unchanged lines in 5 files lost coverage.
- Overall coverage increased (+0.03%) to 89.997%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| tracing/datadog.py | 1 | 94.59% |
| components/generators/openai.py | 2 | 96.34% |
| components/audio/whisper_local.py | 5 | 92.19% |
| components/fetchers/link_content.py | 12 | 78.49% |
| core/pipeline/pipeline.py | 19 | 73.83% |
| <!-- | Total: | 39 |
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.03% |
| Covered Lines: | 6757 |
| Relevant Lines: | 7508 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9744575374
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 39 unchanged lines in 5 files lost coverage.
- Overall coverage increased (+0.03%) to 89.997%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| tracing/datadog.py | 1 | 94.59% |
| components/generators/openai.py | 2 | 96.34% |
| components/audio/whisper_local.py | 5 | 92.19% |
| components/fetchers/link_content.py | 12 | 78.49% |
| core/pipeline/pipeline.py | 19 | 73.83% |
| <!-- | Total: | 39 |
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.03% |
| Covered Lines: | 6757 |
| Relevant Lines: | 7508 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9744993711
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 39 unchanged lines in 5 files lost coverage.
- Overall coverage increased (+0.03%) to 89.997%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| tracing/datadog.py | 1 | 94.59% |
| components/generators/openai.py | 2 | 96.34% |
| components/audio/whisper_local.py | 5 | 92.19% |
| components/fetchers/link_content.py | 12 | 78.49% |
| core/pipeline/pipeline.py | 19 | 73.83% |
| <!-- | Total: | 39 |
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.03% |
| Covered Lines: | 6757 |
| Relevant Lines: | 7508 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9745315180
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 39 unchanged lines in 5 files lost coverage.
- Overall coverage increased (+0.03%) to 89.997%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| tracing/datadog.py | 1 | 94.59% |
| components/generators/openai.py | 2 | 96.34% |
| components/audio/whisper_local.py | 5 | 92.19% |
| components/fetchers/link_content.py | 12 | 78.49% |
| core/pipeline/pipeline.py | 19 | 73.83% |
| <!-- | Total: | 39 |
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.03% |
| Covered Lines: | 6757 |
| Relevant Lines: | 7508 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9745512638
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 39 unchanged lines in 5 files lost coverage.
- Overall coverage increased (+0.03%) to 89.997%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| tracing/datadog.py | 1 | 94.59% |
| components/generators/openai.py | 2 | 96.34% |
| components/audio/whisper_local.py | 5 | 92.19% |
| components/fetchers/link_content.py | 12 | 78.49% |
| core/pipeline/pipeline.py | 19 | 73.83% |
| <!-- | Total: | 39 |
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.03% |
| Covered Lines: | 6757 |
| Relevant Lines: | 7508 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9745820627
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 39 unchanged lines in 5 files lost coverage.
- Overall coverage increased (+0.03%) to 89.997%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| tracing/datadog.py | 1 | 94.59% |
| components/generators/openai.py | 2 | 96.34% |
| components/audio/whisper_local.py | 5 | 92.19% |
| components/fetchers/link_content.py | 12 | 78.49% |
| core/pipeline/pipeline.py | 19 | 73.83% |
| <!-- | Total: | 39 |
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.03% |
| Covered Lines: | 6757 |
| Relevant Lines: | 7508 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9746248019
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 39 unchanged lines in 5 files lost coverage.
- Overall coverage increased (+0.03%) to 89.997%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| tracing/datadog.py | 1 | 94.59% |
| components/generators/openai.py | 2 | 96.34% |
| components/audio/whisper_local.py | 5 | 92.19% |
| components/fetchers/link_content.py | 12 | 78.49% |
| core/pipeline/pipeline.py | 19 | 73.83% |
| <!-- | Total: | 39 |
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.03% |
| Covered Lines: | 6757 |
| Relevant Lines: | 7508 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9746429519
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 39 unchanged lines in 5 files lost coverage.
- Overall coverage increased (+0.03%) to 89.997%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| tracing/datadog.py | 1 | 94.59% |
| components/generators/openai.py | 2 | 96.34% |
| components/audio/whisper_local.py | 5 | 92.19% |
| components/fetchers/link_content.py | 12 | 78.49% |
| core/pipeline/pipeline.py | 19 | 73.83% |
| <!-- | Total: | 39 |
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.03% |
| Covered Lines: | 6757 |
| Relevant Lines: | 7508 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9746625917
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 39 unchanged lines in 5 files lost coverage.
- Overall coverage increased (+0.03%) to 89.997%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| tracing/datadog.py | 1 | 94.59% |
| components/generators/openai.py | 2 | 96.34% |
| components/audio/whisper_local.py | 5 | 92.19% |
| components/fetchers/link_content.py | 12 | 78.49% |
| core/pipeline/pipeline.py | 19 | 73.83% |
| <!-- | Total: | 39 |
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.03% |
| Covered Lines: | 6757 |
| Relevant Lines: | 7508 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9747206764
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 39 unchanged lines in 5 files lost coverage.
- Overall coverage increased (+0.03%) to 89.997%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| tracing/datadog.py | 1 | 94.59% |
| components/generators/openai.py | 2 | 96.34% |
| components/audio/whisper_local.py | 5 | 92.19% |
| components/fetchers/link_content.py | 12 | 78.49% |
| core/pipeline/pipeline.py | 19 | 73.83% |
| <!-- | Total: | 39 |
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.03% |
| Covered Lines: | 6757 |
| Relevant Lines: | 7508 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9774418484
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 45 unchanged lines in 6 files lost coverage.
- Overall coverage increased (+0.02%) to 89.989%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| tracing/datadog.py | 1 | 94.59% |
| components/generators/openai.py | 2 | 96.34% |
| components/audio/whisper_local.py | 5 | 92.19% |
| components/evaluators/llm_evaluator.py | 6 | 94.74% |
| components/fetchers/link_content.py | 12 | 78.49% |
| core/pipeline/pipeline.py | 19 | 73.83% |
| <!-- | Total: | 45 |
| Totals | |
|---|---|
| Change from base Build 9660499069: | 0.02% |
| Covered Lines: | 6760 |
| Relevant Lines: | 7512 |