Skip to content

fix: FastEmbedder reordered the top_k fallback to happen after validation - #3745

Merged
davidsbatista merged 2 commits into
mainfrom
fix/fastembed-ranker-top-k-zero
Aug 10, 2026
Merged

fix: FastEmbedder reordered the top_k fallback to happen after validation#3745
davidsbatista merged 2 commits into
mainfrom
fix/fastembed-ranker-top-k-zero

Conversation

@davidsbatista

@davidsbatista davidsbatista commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Related Issues

Proposed Changes:

  • reordered the top_k fallback to happen after validation

How did you test it?

  • one new test

Checklist

@github-actions github-actions Bot added integration:fastembed type:documentation Improvements or additions to documentation labels Aug 7, 2026
@davidsbatista
davidsbatista marked this pull request as ready for review August 7, 2026 16:15
@davidsbatista
davidsbatista requested a review from a team as a code owner August 7, 2026 16:15
@davidsbatista
davidsbatista requested review from anakin87 and removed request for a team August 7, 2026 16:15
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Coverage report (fastembed)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  integrations/fastembed/src/haystack_integrations/components/rankers/fastembed
  ranker.py
Project Total  

This report was generated by python-coverage-comment-action

):
ranker.run(query=query, documents=list_document, top_k=0)

def test_run_runtime_top_k_zero_does_not_fall_back_to_instance_top_k(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this test is, in practice, a duplicate of the assertion above. In fact, by default FastembedRanker has top_k=10, so I'd remove this test

@anakin87 anakin87 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@davidsbatista
davidsbatista merged commit 0d5fe78 into main Aug 10, 2026
16 checks passed
@davidsbatista
davidsbatista deleted the fix/fastembed-ranker-top-k-zero branch August 10, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:fastembed type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants