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

chore: update sentence transformers import error message #7906

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

anakin87
Copy link
Member

Related Issues

While helping a user in #7850, I discovered that we are suggesting to install sentence-transformers>=2.2.0,
while the parameter trust_remote_code (introduced in Haystack in #7356) is only compatible with >=2.3.0 (UKPLab/sentence-transformers#2272).

Proposed Changes:

  • update the import error message
  • update also the test dependencies in pyproject

How did you test it?

CI

Checklist

@anakin87 anakin87 requested review from a team as code owners June 20, 2024 15:50
@anakin87 anakin87 requested review from dfokina and davidsbatista and removed request for a team June 20, 2024 15:50
@@ -11,7 +11,7 @@
from haystack.utils import ComponentDevice, expit
from haystack.utils.auth import Secret, deserialize_secrets_inplace

with LazyImport(message="Run 'pip install scikit-learn \"sentence-transformers>=2.2.0\"'") as sas_import:
with LazyImport(message="Run 'pip install \"sentence-transformers>=2.3.0\"'") as sas_import:
Copy link
Member Author

Choose a reason for hiding this comment

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

unrelated: we don't directly depend on scikit-learn (which is a core dependency of sentence-transformers).

Copy link
Contributor

@davidsbatista davidsbatista left a comment

Choose a reason for hiding this comment

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

LGTM

@coveralls
Copy link
Collaborator

coveralls commented Jun 20, 2024

Pull Request Test Coverage Report for Build 9600530110

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.171%

Totals Coverage Status
Change from base Build 9596818530: 0.0%
Covered Lines: 7018
Relevant Lines: 7783

💛 - Coveralls

@anakin87 anakin87 merged commit d80e014 into main Jun 20, 2024
19 checks passed
@anakin87 anakin87 deleted the update-sentence-transformers-lazy-import-error-msg branch June 20, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants