You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added a revision parameter to all Sentence Transformers embedder components to allow users to specify a specific model revision/version from the Hugging Face Hub. This parameter is passed through to the underlying Sentence Transformers backend.
How did you test it?
Added unit tests for all four embedder components to verify the revision parameter is correctly:
Initialized with default value (None)
Set when provided explicitly (e.g., "v1.0")
Serialized and deserialized in to_dict() and from_dict() methods
Updated existing backend initialization tests to include the revision parameter
All pre-commit hooks passed successfully
Notes for the reviewer
The revision parameter follows the same pattern as other optional parameters like trust_remote_code and local_files_only. It's passed directly to the Sentence Transformers model initialization, allowing users to pin to specific model versions for reproducibility.
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: and added ! in case the PR includes breaking changes.
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.
@swapniel99 could you also add a release note following our guidelines here and fix the failing linting errors. You can reproduce this locally by running hatch run test:lint haystack. Also explained in our contributions guidelines here
@swapniel99 could you also add a release note following our guidelines here and fix the failing linting errors. You can reproduce this locally by running hatch run test:lint haystack. Also explained in our contributions guidelines here
I checked but these lines were not edited by me. I don't understand what is supposed to be done here.
Running the lint check is extremely slow on my laptop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
None
Proposed Changes:
Added a
revisionparameter to all Sentence Transformers embedder components to allow users to specify a specific model revision/version from the Hugging Face Hub. This parameter is passed through to the underlying Sentence Transformers backend.How did you test it?
Notes for the reviewer
The
revisionparameter follows the same pattern as other optional parameters liketrust_remote_codeandlocal_files_only. It's passed directly to the Sentence Transformers model initialization, allowing users to pin to specific model versions for reproducibility.Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.