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

feat: Add model and tokenizer kwargs to TransformersSimilarityRanker, SentenceTransformersDocumentEmbedder, SentenceTransformersTextEmbedder #8145

Merged
merged 8 commits into from
Aug 2, 2024

Conversation

sjrl
Copy link
Contributor

@sjrl sjrl commented Aug 1, 2024

Related Issues

Proposed Changes:

Adds model_kwargs and tokenizer_kwargs to the components TransformersSimilarityRanker, SentenceTransformersDocumentEmbedder, SentenceTransformersTextEmbedder

How did you test it?

Expanded existing unit tests

Notes for the reviewer

Checklist

@sjrl sjrl requested a review from a team as a code owner August 1, 2024 13:41
@sjrl sjrl requested review from shadeMe and removed request for a team August 1, 2024 13:41
@github-actions github-actions bot added topic:tests type:documentation Improvements on the docs labels Aug 1, 2024
@sjrl sjrl requested a review from a team as a code owner August 1, 2024 13:43
@sjrl sjrl requested review from dfokina and removed request for a team August 1, 2024 13:43
@coveralls
Copy link
Collaborator

coveralls commented Aug 1, 2024

Pull Request Test Coverage Report for Build 10210727170

Warning: This coverage report may be inaccurate.

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.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 32 unchanged lines in 5 files lost coverage.
  • Overall coverage increased (+0.02%) to 90.115%

Files with Coverage Reduction New Missed Lines %
components/embedders/sentence_transformers_document_embedder.py 2 96.49%
components/embedders/sentence_transformers_text_embedder.py 2 95.92%
components/rankers/transformers_similarity.py 6 91.11%
components/retrievers/sentence_window_retriever.py 9 83.33%
components/fetchers/link_content.py 13 79.79%
Totals Coverage Status
Change from base Build 10197271394: 0.02%
Covered Lines: 6883
Relevant Lines: 7638

💛 - Coveralls

@sjrl
Copy link
Contributor Author

sjrl commented Aug 2, 2024

Hey @dfokina let me know if the docstrings for the new parameters look okay!

Copy link
Contributor

@dfokina dfokina left a comment

Choose a reason for hiding this comment

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

Thanks @sjrl - looks good! 🚀

@sjrl sjrl merged commit c90495c into main Aug 2, 2024
17 checks passed
@sjrl sjrl deleted the model-and-tokenizer-kwargs branch August 2, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:tests type:documentation Improvements on the docs
Projects
None yet
4 participants