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: HuggingFaceAPIGenerator #7464

Merged
merged 13 commits into from
Apr 5, 2024
Merged

feat: HuggingFaceAPIGenerator #7464

merged 13 commits into from
Apr 5, 2024

Conversation

anakin87
Copy link
Member

@anakin87 anakin87 commented Apr 4, 2024

Related Issues

Proposed Changes:

As discussed in #7279 (comment),

  • introduce a new better HuggingFaceAPIGenerator
  • deprecate HuggingFaceTGIGenerator

How did you test it?

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

Checklist

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

coveralls commented Apr 4, 2024

Pull Request Test Coverage Report for Build 8571017484

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.
  • 52 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.2%) to 89.531%

Files with Coverage Reduction New Missed Lines %
components/generators/hugging_face_tgi.py 5 94.51%
utils/device.py 21 89.9%
utils/hf.py 26 78.87%
Totals Coverage Status
Change from base Build 8551366133: 0.2%
Covered Lines: 5798
Relevant Lines: 6476

💛 - Coveralls

haystack/components/generators/hugging_face_api.py Outdated Show resolved Hide resolved
haystack/components/generators/hugging_face_api.py Outdated Show resolved Hide resolved
haystack/components/generators/hugging_face_api.py Outdated Show resolved Hide resolved
haystack/components/generators/hugging_face_api.py Outdated Show resolved Hide resolved
haystack/components/generators/hugging_face_api.py Outdated Show resolved Hide resolved
haystack/components/generators/hugging_face_api.py Outdated Show resolved Hide resolved
haystack/components/generators/hugging_face_api.py Outdated Show resolved Hide resolved
haystack/utils/hf.py Outdated Show resolved Hide resolved
@anakin87 anakin87 requested a review from shadeMe April 5, 2024 14:25
Copy link
Collaborator

@shadeMe shadeMe left a comment

Choose a reason for hiding this comment

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

LGTM!

haystack/utils/hf.py Outdated Show resolved Hide resolved
@anakin87 anakin87 merged commit 1d08386 into main Apr 5, 2024
24 checks passed
@anakin87 anakin87 deleted the hfapigenerator branch April 5, 2024 16:48
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.

None yet

3 participants