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: HuggingFaceAPITextEmbedder #7484

Merged
merged 9 commits into from
Apr 8, 2024
Merged

feat: HuggingFaceAPITextEmbedder #7484

merged 9 commits into from
Apr 8, 2024

Conversation

anakin87
Copy link
Member

@anakin87 anakin87 commented Apr 5, 2024

Related Issues

Proposed Changes:

  • introduce a new better HuggingFaceAPITextEmbedder
  • deprecate HuggingFaceTEITextEmbedder

How did you test it?

CI, new tests, extensive manual tests: with HF Inference API, local TEI container and paid HF Inference Endpoint

Checklist

Comment on lines 1 to 6
from urllib.parse import urlparse


def is_valid_http_url(url) -> bool:
r = urlparse(url)
return all([r.scheme in ["http", "https"], r.netloc])
Copy link
Member Author

Choose a reason for hiding this comment

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

This can be ignored.
I introduced and tested it in #7464, but I also added it in this PR to make the 2 PRs independent.

@anakin87 anakin87 marked this pull request as ready for review April 5, 2024 08:33
@anakin87 anakin87 requested review from a team as code owners April 5, 2024 08:33
@anakin87 anakin87 requested review from dfokina and masci and removed request for a team April 5, 2024 08:33
@github-actions github-actions bot added topic:tests 2.x Related to Haystack v2.0 type:documentation Improvements on the docs labels Apr 5, 2024
@coveralls
Copy link
Collaborator

coveralls commented Apr 5, 2024

Pull Request Test Coverage Report for Build 8597162116

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.
  • 26 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.08%) to 89.739%

Files with Coverage Reduction New Missed Lines %
components/embedders/hugging_face_tei_text_embedder.py 1 97.83%
utils/hf.py 25 79.49%
Totals Coverage Status
Change from base Build 8596876748: 0.08%
Covered Lines: 5947
Relevant Lines: 6627

💛 - Coveralls

haystack/utils/hf.py Outdated Show resolved Hide resolved
@anakin87 anakin87 requested a review from shadeMe April 5, 2024 14:52
@masci masci removed their request for review April 8, 2024 07:00
@anakin87 anakin87 merged commit c91bd49 into main Apr 8, 2024
24 checks passed
@anakin87 anakin87 deleted the hfapitextembedder branch April 8, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to Haystack v2.0 topic:tests type:documentation Improvements on the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants