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

[ENH] -- CrossEncoder.rank #2947

Merged
merged 6 commits into from
Oct 8, 2024

Commits on Sep 20, 2024

  1. modified: sentence_transformers/cross_encoder/CrossEncoder.py

    	- Replaced `range(len(scores))` with `enumerate(scores)` and used index (`i`) and `score` directly.
    it176131 committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    5574264 View commit details
    Browse the repository at this point in the history
  2. modified: sentence_transformers/cross_encoder/CrossEncoder.py

    	- Removed need for `else` by appending to `results` once, then conditionally updating appended value given `return_documents`.
    it176131 committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    0087b2c View commit details
    Browse the repository at this point in the history
  3. modified: sentence_transformers/cross_encoder/CrossEncoder.py

    	- Used parameter name to match other kwarg usage.
    it176131 committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    41aa7a2 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. modified: sentence_transformers/cross_encoder/CrossEncoder.py

    	- Updated dictionary unioning to use Python 3.8 compatible syntax in :method:`CrossEncoder.rank`.
    
    modified:   tests/test_cross_encoder.py
    	- Parametrized test :callable:`test_rank` with checks for `return_documents` argument.
    it176131 committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    0701cea View commit details
    Browse the repository at this point in the history
  2. modified: tests/test_cross_encoder.py

    	- Used a `FixtureRequest` to do further testing when `return_documents` is True.
    it176131 committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    27e5ee9 View commit details
    Browse the repository at this point in the history
  3. modified: sentence_transformers/cross_encoder/CrossEncoder.py

    	- Changed method of unioning dictionary to `update` in :method:`CrossEncoder.rank` to avoid unpacking original dictionary.
    it176131 committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    b559628 View commit details
    Browse the repository at this point in the history