-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fix: Use use_auth_token in all cases when loading from the HF Hub #3094
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good to me already. Just some small remarks to further improve. Further, I was wondering whether we could add a test case to make sure a problem with auth tokens is recognized faster in future. The auth token could be stored as a GitHub secret.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a change! That's no surprise no one wanted to do this before 😄 Looks good to me, except for the pipes, that need to be reverted. @vblagoje do you want to have a look too?
We could definitely do that. However, to completely test this I think we would need to have a private HF model for all cases we want to test (e.g. Reader, Retriever, Summarizer, AnswerGenerator, etc.). |
@julian-risch Is it alright if we open this as a new issue? It may be worth discussing how we would like to best test this across Haystack. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now. 👍
Related Issues
Proposed Changes:
I've passed the
use_auth_token
to the HuggingFace methods that accept it (e.g.from_petrained()
andpipeline
).How did you test it?
I was able to load a private Reader model from HF after the changes were made
Notes for the reviewer
use_auth_token
is not consistently used throughout Haystack. This PR tries to useuse_auth_token
consistently in all places in Haystack when loading models from the HF hub.Checklist