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 Zero Shot Transformers Text Router #7018

Merged
merged 25 commits into from
Mar 15, 2024
Merged

feat: Add Zero Shot Transformers Text Router #7018

merged 25 commits into from
Mar 15, 2024

Conversation

sjrl
Copy link
Contributor

@sjrl sjrl commented Feb 16, 2024

Related Issues

Proposed Changes:

  • Add TransformersZeroShotTextRouter based off of TransformersQueryClassifier (from Haystack v1)
  • Did some refactoring of the HF utils to reduce duplicate code.

How did you test it?

Added unit tests and integration tests.

Notes for the reviewer

Checklist

@github-actions github-actions bot added 2.x Related to Haystack v2.0 type:documentation Improvements on the docs labels Feb 16, 2024
@sjrl sjrl changed the title WIP: Add Transformers Text Router WIP: Add Zero Shot Transformers Text Router Feb 28, 2024
@coveralls
Copy link
Collaborator

coveralls commented Feb 28, 2024

Pull Request Test Coverage Report for Build 8296049792

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 2 files lost coverage.
  • Overall coverage increased (+0.04%) to 89.204%

Files with Coverage Reduction New Missed Lines %
components/generators/hugging_face_local.py 3 95.0%
utils/hf.py 29 75.59%
Totals Coverage Status
Change from base Build 8292785453: 0.04%
Covered Lines: 5371
Relevant Lines: 6021

💛 - Coveralls

@sjrl sjrl marked this pull request as ready for review March 13, 2024 11:11
@sjrl sjrl requested review from a team as code owners March 13, 2024 11:11
@sjrl sjrl requested review from dfokina and vblagoje and removed request for a team March 13, 2024 11:11
@sjrl sjrl changed the title WIP: Add Zero Shot Transformers Text Router feat: Add Zero Shot Transformers Text Router Mar 13, 2024
Copy link
Member

@vblagoje vblagoje left a comment

Choose a reason for hiding this comment

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

@sjrl seems like you are still working on this PR. Looks good already, just wanted to give you quick heads up about a few things that popped up

@sjrl sjrl requested a review from vblagoje March 14, 2024 14:30
Copy link
Member

@vblagoje vblagoje left a comment

Choose a reason for hiding this comment

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

@sjrl looks good codewise except I was still slightly confused by the example. Can we improve it a bit 🙏

@anakin87
Copy link
Member

anakin87 commented Mar 15, 2024

Ok np, I was surprised by it, that's all. And wanted to ping @anakin87 for a nod?

Looks good. We can iterate on it in the future...

@sjrl sjrl requested a review from vblagoje March 15, 2024 12:19
Copy link
Member

@vblagoje vblagoje left a comment

Choose a reason for hiding this comment

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

Let's 🚢 thanks for the updates @sjrl

@sjrl sjrl merged commit 85c1e39 into main Mar 15, 2024
23 checks passed
@sjrl sjrl deleted the text-router branch March 15, 2024 12:56
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.

TextClassifier (porting TransformersQueryClassifier)
4 participants