-
Notifications
You must be signed in to change notification settings - Fork 709
feat(hugginface): allow specifying huggingface endpoint #6801
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
Conversation
|
The produced URLs haven't been tested so I would need to mock the http client the assert on the created URLs, do you have an already established approach for that? |
I think this change is simple enough to merge directly. Let's go. |
Xuanwo
left a comment
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.
Thank you for working on this!
We can set up another integration test for https://hub-ci.huggingface.co at https://github.com/apache/opendal/tree/main/.github/services/huggingface/huggingface. Is this endpoint available for registration? I can help set up this test infra. |
|
Thanks @Xuanwo for reviewing and merging!
Yes. @lhoestq can provide more context. |
Rationale for this change
Huggingface Private Hub may use custom endpoint, it is also useful for enabling open source projects to use https://hub-ci.huggingface.co for testing.
What changes are included in this PR?
Add support for configuring huggingface endpoint. If not provided, it tries to read from
HF_ENDPOINTenvironment variable.It also fixes a bug when passing revision which must be encoded, like
refs/convert/parquetshould be encoded asrefs%2Fconvert%2Fparquet.Are there any user-facing changes?
There is a new builder method called
.endpoint().