-
Notifications
You must be signed in to change notification settings - Fork 570
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
Rename the env variable HF_ENDPOINT
.
#819
Conversation
Pinging @SBrandeis since your made the initial modification so you are aware of this name change. Is it OK to change the name here ? |
Yes @Narsil that is fine |
src/huggingface_hub/hf_api.py
Outdated
@@ -467,7 +467,7 @@ def erase_from_credential_store(username=None): | |||
class HfApi: | |||
def __init__(self, endpoint=None): | |||
self.endpoint = ( | |||
endpoint if endpoint is not None else os.getenv("HF_ENDPOINT", ENDPOINT) | |||
endpoint if endpoint is not None else ENDPOINT |
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.
I removed this, since ENDPOINT
is already inheriting from the same env variable, to reduce the potential from divergence.
The documentation is not available anymore as the PR was closed or merged. |
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 great! Thank you!
Thanks for the fix @Narsil . It'd be nice if for future PRs you'd create the feature branches on your fork rather than the main repo 😊 |
Ok, thanks for the heads up. |
This improves consistency across HF ecosystem.
https://github.com/huggingface/transformers/blob/c595b6e6a90c29242c9dbfeecc5b132fe2e3d1f4/src/transformers/utils/hub.py#L110
https://github.com/huggingface/datasets/blob/8c5f27889657a1a6a7203b2f054bd0ceffce2178/src/datasets/config.py#L24
Fixes #798