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

Add endpoint param to hf_hub_url #1082

Closed
mariosasko opened this issue Sep 26, 2022 · 6 comments
Closed

Add endpoint param to hf_hub_url #1082

mariosasko opened this issue Sep 26, 2022 · 6 comments
Labels
good first issue Good for newcomers

Comments

@mariosasko
Copy link
Contributor

As discussed in huggingface/hffs#1, it would be nice to add the endpoint param to hf_hub_url to support passing custom endpoints (useful for private Hub users)

@mariosasko mariosasko added the enhancement New feature or request label Sep 26, 2022
@osanseviero
Copy link
Contributor

One can set the HF_ENDPOINT environment variable to change the endpoint, which was added with private Hub use cases in mind

https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/constants.py#L42

@Wauplin
Copy link
Contributor

Wauplin commented Sep 27, 2022

Thanks @mariosasko for opening the ticket and thanks @osanseviero for providing a solution :)
Environment variable is a good way to solve that but let's keep this issue open. Wouldn't hurt to have 2 ways of settings the endpoint.

For the record, request is related to hffs implementation: huggingface/hffs#1 (comment)

@julien-c
Copy link
Member

in hffs context, what's the use case for setting an endpoint?

@mariosasko
Copy link
Contributor Author

@julien-c For easier testing (see huggingface/hffs#1 (comment))

I can remove the endpoint param for now and use the env variable instead, but then we need to use patching, which makes the tests more complex (I assume HfApi has this param for the same reason).

@severo
Copy link
Collaborator

severo commented Jun 16, 2023

@Wauplin
Copy link
Contributor

Wauplin commented Aug 8, 2023

Done in #1580.

@Wauplin Wauplin closed this as completed Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants