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

Rename the env variable HF_ENDPOINT. #819

Merged
merged 3 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/huggingface_hub/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
os.environ.get("HUGGINGFACE_CO_STAGING", "NO").upper() in ENV_VARS_TRUE_VALUES
)

ENDPOINT = os.getenv("HF_HUB_URL") or (
ENDPOINT = os.getenv("HF_ENDPOINT") or (
"https://moon-staging.huggingface.co" if _staging_mode else "https://huggingface.co"
)

Expand Down
2 changes: 1 addition & 1 deletion src/huggingface_hub/hf_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor Author

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.

)

def login(self, username: str, password: str) -> str:
Expand Down