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

Allow enabling rerankers raw_scores #393

Merged
merged 1 commit into from
Oct 2, 2024
Merged

Conversation

rawsh
Copy link
Contributor

@rawsh rawsh commented Oct 2, 2024

Add raw_scores bool to reranker endpoint inputs

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request adds a 'raw_scores' option to the reranker endpoint, allowing users to request unprocessed scores from the reranking model.

  • Added 'raw_scores' boolean field to RerankInput class in /libs/infinity_emb/infinity_emb/fastapi_schemas/pymodels.py
  • Implemented 'raw_scores' parameter handling in _rerank function of /libs/infinity_emb/infinity_emb/infinity_server.py
  • The change allows passing 'raw_scores' directly to the engine.rerank method
  • Verify that the new parameter is handled correctly throughout the reranking logic
  • Ensure documentation is updated to reflect this new option for the reranker endpoint

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.67%. Comparing base (bb39cbd) to head (058d8e9).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #393   +/-   ##
=======================================
  Coverage   78.66%   78.67%           
=======================================
  Files          39       39           
  Lines        2962     2963    +1     
=======================================
+ Hits         2330     2331    +1     
  Misses        632      632           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michaelfeil michaelfeil merged commit 99d28e2 into michaelfeil:main Oct 2, 2024
36 checks passed
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.

3 participants