-
Notifications
You must be signed in to change notification settings - Fork 392
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
Deprecated use_auth_token
#1837
base: main
Are you sure you want to change the base?
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
LGTM
@@ -205,6 +218,15 @@ def _get_config_dict( | |||
from_auto_class = kwargs.pop("_from_auto", False) | |||
commit_hash = kwargs.pop("_commit_hash", None) | |||
|
|||
if use_auth_token is not None: | |||
warnings.warn( |
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.
warnings.warn( | |
logger.warning( |
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.
Interestingly Transformers also uses warnings.warn, not sure why the mix?
from functools import partial | ||
from pathlib import Path | ||
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union | ||
|
||
import huggingface_hub | ||
from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE | ||
from huggingface_hub.utils import OfflineModeIsEnabled |
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.
Good catch, thank you for fixing. Maybe even move to huggingface_hub.errors.OfflineModeIsEnabled
? https://github.com/huggingface/huggingface_hub/blob/v0.23.3/src/huggingface_hub/errors.py#L16
As I guess the huggingface_hub.utils.OfflineModeIsEnabled
path is deprecated?
What does this PR do?
This PR deprecates the use
use_auth_token
in favor oftoken
.Fixes #1836
Before submitting
Who can review?
@fxmarty @echarlaix @mht-sharma