-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat: add revision parameter to Sentence Transformers embedder components #10003
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
base: main
Are you sure you want to change the base?
Conversation
|
@swapniel99 is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
| meta_fields_to_embed: Optional[list[str]] = None, | ||
| embedding_separator: str = "\n", | ||
| trust_remote_code: bool = False, | ||
| revision: Optional[str] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid this being a breaking change (since we are inserting a new positional argument in the middle of existing ones) put this as the last argument in the init
| progress_bar: bool = True, | ||
| normalize_embeddings: bool = False, | ||
| trust_remote_code: bool = False, | ||
| revision: Optional[str] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here let's move this one to the bottom of the init since this init method consists of positional arguments
Pull Request Test Coverage Report for Build 18994388892Details
💛 - Coveralls |
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.