"docs/source/en/tasks/sequence_classification.md" did not exist on "62cbd8423b3b8ab173fba9cf8c7346eca5f76d32"
Unverified Commit 835de4c8 authored by Lucain's avatar Lucain Committed by GitHub
Browse files

Respect `resume_download` deprecation (#30620)



* Deprecate resume_download

* remove default resume_download value

---------
Co-authored-by: default avatarLysandre Debut <hi@lysand.re>
parent 277db238
...@@ -116,7 +116,8 @@ _deps = [ ...@@ -116,7 +116,8 @@ _deps = [
"ftfy", "ftfy",
"fugashi>=1.0", "fugashi>=1.0",
"GitPython<3.1.19", "GitPython<3.1.19",
"huggingface-hub>=0.19.3,<1.0", "hf-doc-builder>=0.3.0",
"huggingface-hub>=0.23.0,<1.0",
"importlib_metadata", "importlib_metadata",
"ipadic>=1.0.0,<2.0", "ipadic>=1.0.0,<2.0",
"isort>=5.5.4", "isort>=5.5.4",
......
...@@ -23,7 +23,8 @@ deps = { ...@@ -23,7 +23,8 @@ deps = {
"ftfy": "ftfy", "ftfy": "ftfy",
"fugashi": "fugashi>=1.0", "fugashi": "fugashi>=1.0",
"GitPython": "GitPython<3.1.19", "GitPython": "GitPython<3.1.19",
"huggingface-hub": "huggingface-hub>=0.19.3,<1.0", "hf-doc-builder": "hf-doc-builder>=0.3.0",
"huggingface-hub": "huggingface-hub>=0.23.0,<1.0",
"importlib_metadata": "importlib_metadata", "importlib_metadata": "importlib_metadata",
"ipadic": "ipadic>=1.0.0,<2.0", "ipadic": "ipadic>=1.0.0,<2.0",
"isort": "isort>=5.5.4", "isort": "isort>=5.5.4",
......
...@@ -214,7 +214,7 @@ def get_cached_module_file( ...@@ -214,7 +214,7 @@ def get_cached_module_file(
module_file: str, module_file: str,
cache_dir: Optional[Union[str, os.PathLike]] = None, cache_dir: Optional[Union[str, os.PathLike]] = None,
force_download: bool = False, force_download: bool = False,
resume_download: bool = False, resume_download: Optional[bool] = None,
proxies: Optional[Dict[str, str]] = None, proxies: Optional[Dict[str, str]] = None,
token: Optional[Union[bool, str]] = None, token: Optional[Union[bool, str]] = None,
revision: Optional[str] = None, revision: Optional[str] = None,
...@@ -244,8 +244,9 @@ def get_cached_module_file( ...@@ -244,8 +244,9 @@ def get_cached_module_file(
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the configuration files and override the cached versions if they Whether or not to force to (re-)download the configuration files and override the cached versions if they
exist. exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file exists. Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
...@@ -389,7 +390,7 @@ def get_class_from_dynamic_module( ...@@ -389,7 +390,7 @@ def get_class_from_dynamic_module(
pretrained_model_name_or_path: Union[str, os.PathLike], pretrained_model_name_or_path: Union[str, os.PathLike],
cache_dir: Optional[Union[str, os.PathLike]] = None, cache_dir: Optional[Union[str, os.PathLike]] = None,
force_download: bool = False, force_download: bool = False,
resume_download: bool = False, resume_download: Optional[bool] = None,
proxies: Optional[Dict[str, str]] = None, proxies: Optional[Dict[str, str]] = None,
token: Optional[Union[bool, str]] = None, token: Optional[Union[bool, str]] = None,
revision: Optional[str] = None, revision: Optional[str] = None,
...@@ -432,8 +433,9 @@ def get_class_from_dynamic_module( ...@@ -432,8 +433,9 @@ def get_class_from_dynamic_module(
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the configuration files and override the cached versions if they Whether or not to force to (re-)download the configuration files and override the cached versions if they
exist. exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file exists. Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
......
...@@ -293,9 +293,9 @@ class FeatureExtractionMixin(PushToHubMixin): ...@@ -293,9 +293,9 @@ class FeatureExtractionMixin(PushToHubMixin):
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the feature extractor files and override the cached versions Whether or not to force to (re-)download the feature extractor files and override the cached versions
if they exist. if they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file Deprecated and ignored. All downloads are now resumed by default when possible.
exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
...@@ -451,7 +451,7 @@ class FeatureExtractionMixin(PushToHubMixin): ...@@ -451,7 +451,7 @@ class FeatureExtractionMixin(PushToHubMixin):
""" """
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
subfolder = kwargs.pop("subfolder", None) subfolder = kwargs.pop("subfolder", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
......
...@@ -729,9 +729,9 @@ class GenerationConfig(PushToHubMixin): ...@@ -729,9 +729,9 @@ class GenerationConfig(PushToHubMixin):
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the configuration files and override the cached versions if Whether or not to force to (re-)download the configuration files and override the cached versions if
they exist. they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file Deprecated and ignored. All downloads are now resumed by default when possible.
exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
...@@ -795,7 +795,7 @@ class GenerationConfig(PushToHubMixin): ...@@ -795,7 +795,7 @@ class GenerationConfig(PushToHubMixin):
```""" ```"""
config_file_name = config_file_name if config_file_name is not None else GENERATION_CONFIG_NAME config_file_name = config_file_name if config_file_name is not None else GENERATION_CONFIG_NAME
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
use_auth_token = kwargs.pop("use_auth_token", None) use_auth_token = kwargs.pop("use_auth_token", None)
subfolder = kwargs.pop("subfolder", "") subfolder = kwargs.pop("subfolder", "")
......
...@@ -123,9 +123,9 @@ class ImageProcessingMixin(PushToHubMixin): ...@@ -123,9 +123,9 @@ class ImageProcessingMixin(PushToHubMixin):
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the image processor files and override the cached versions if Whether or not to force to (re-)download the image processor files and override the cached versions if
they exist. they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file Deprecated and ignored. All downloads are now resumed by default when possible.
exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
...@@ -287,7 +287,7 @@ class ImageProcessingMixin(PushToHubMixin): ...@@ -287,7 +287,7 @@ class ImageProcessingMixin(PushToHubMixin):
""" """
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
use_auth_token = kwargs.pop("use_auth_token", None) use_auth_token = kwargs.pop("use_auth_token", None)
......
...@@ -591,9 +591,9 @@ class FlaxPreTrainedModel(PushToHubMixin, FlaxGenerationMixin): ...@@ -591,9 +591,9 @@ class FlaxPreTrainedModel(PushToHubMixin, FlaxGenerationMixin):
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force the (re-)download of the model weights and configuration files, overriding the Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist. cached versions if they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received files. Will attempt to resume the download if such a Deprecated and ignored. All downloads are now resumed by default when possible.
file exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
...@@ -645,7 +645,7 @@ class FlaxPreTrainedModel(PushToHubMixin, FlaxGenerationMixin): ...@@ -645,7 +645,7 @@ class FlaxPreTrainedModel(PushToHubMixin, FlaxGenerationMixin):
>>> model = FlaxBertModel.from_pretrained("./pt_model/pytorch_model.bin", from_pt=True, config=config) >>> model = FlaxBertModel.from_pretrained("./pt_model/pytorch_model.bin", from_pt=True, config=config)
```""" ```"""
from_pt = kwargs.pop("from_pt", False) from_pt = kwargs.pop("from_pt", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
use_auth_token = kwargs.pop("use_auth_token", None) use_auth_token = kwargs.pop("use_auth_token", None)
trust_remote_code = kwargs.pop("trust_remote_code", None) trust_remote_code = kwargs.pop("trust_remote_code", None)
......
...@@ -2606,9 +2606,9 @@ class TFPreTrainedModel(keras.Model, TFModelUtilsMixin, TFGenerationMixin, PushT ...@@ -2606,9 +2606,9 @@ class TFPreTrainedModel(keras.Model, TFModelUtilsMixin, TFGenerationMixin, PushT
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force the (re-)download of the model weights and configuration files, overriding the Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist. cached versions if they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received files. Will attempt to resume the download if such a Deprecated and ignored. All downloads are now resumed by default when possible.
file exists. Will be removed in v5 of Transformers.
proxies: proxies:
(`Dict[str, str], `optional`): A dictionary of proxy servers to use by protocol or endpoint, e.g., (`Dict[str, str], `optional`): A dictionary of proxy servers to use by protocol or endpoint, e.g.,
`{'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request. `{'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
...@@ -2676,7 +2676,7 @@ class TFPreTrainedModel(keras.Model, TFModelUtilsMixin, TFGenerationMixin, PushT ...@@ -2676,7 +2676,7 @@ class TFPreTrainedModel(keras.Model, TFModelUtilsMixin, TFGenerationMixin, PushT
>>> model = TFBertModel.from_pretrained("./pt_model/my_pytorch_model.bin", from_pt=True, config=config) >>> model = TFBertModel.from_pretrained("./pt_model/my_pytorch_model.bin", from_pt=True, config=config)
```""" ```"""
from_pt = kwargs.pop("from_pt", False) from_pt = kwargs.pop("from_pt", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
output_loading_info = kwargs.pop("output_loading_info", False) output_loading_info = kwargs.pop("output_loading_info", False)
use_auth_token = kwargs.pop("use_auth_token", None) use_auth_token = kwargs.pop("use_auth_token", None)
......
...@@ -2803,9 +2803,9 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix ...@@ -2803,9 +2803,9 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force the (re-)download of the model weights and configuration files, overriding the Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist. cached versions if they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received files. Will attempt to resume the download if such a Deprecated and ignored. All downloads are now resumed by default when possible.
file exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
...@@ -2967,7 +2967,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix ...@@ -2967,7 +2967,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
state_dict = kwargs.pop("state_dict", None) state_dict = kwargs.pop("state_dict", None)
from_tf = kwargs.pop("from_tf", False) from_tf = kwargs.pop("from_tf", False)
from_flax = kwargs.pop("from_flax", False) from_flax = kwargs.pop("from_flax", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
output_loading_info = kwargs.pop("output_loading_info", False) output_loading_info = kwargs.pop("output_loading_info", False)
use_auth_token = kwargs.pop("use_auth_token", None) use_auth_token = kwargs.pop("use_auth_token", None)
......
...@@ -122,9 +122,9 @@ FROM_PRETRAINED_TORCH_DOCSTRING = """ ...@@ -122,9 +122,9 @@ FROM_PRETRAINED_TORCH_DOCSTRING = """
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force the (re-)download of the model weights and configuration files, overriding the Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist. cached versions if they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received files. Will attempt to resume the download if such a Deprecated and ignored. All downloads are now resumed by default when possible.
file exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
...@@ -221,9 +221,9 @@ FROM_PRETRAINED_TF_DOCSTRING = """ ...@@ -221,9 +221,9 @@ FROM_PRETRAINED_TF_DOCSTRING = """
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force the (re-)download of the model weights and configuration files, overriding the Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist. cached versions if they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received files. Will attempt to resume the download if such a Deprecated and ignored. All downloads are now resumed by default when possible.
file exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
...@@ -320,9 +320,9 @@ FROM_PRETRAINED_FLAX_DOCSTRING = """ ...@@ -320,9 +320,9 @@ FROM_PRETRAINED_FLAX_DOCSTRING = """
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force the (re-)download of the model weights and configuration files, overriding the Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist. cached versions if they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received files. Will attempt to resume the download if such a Deprecated and ignored. All downloads are now resumed by default when possible.
file exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
......
...@@ -855,9 +855,9 @@ class AutoConfig: ...@@ -855,9 +855,9 @@ class AutoConfig:
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force the (re-)download the model weights and configuration files and override the Whether or not to force the (re-)download the model weights and configuration files and override the
cached versions if they exist. cached versions if they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received files. Will attempt to resume the download if such a Deprecated and ignored. All downloads are now resumed by default when possible.
file exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
......
...@@ -140,7 +140,7 @@ def get_feature_extractor_config( ...@@ -140,7 +140,7 @@ def get_feature_extractor_config(
pretrained_model_name_or_path: Union[str, os.PathLike], pretrained_model_name_or_path: Union[str, os.PathLike],
cache_dir: Optional[Union[str, os.PathLike]] = None, cache_dir: Optional[Union[str, os.PathLike]] = None,
force_download: bool = False, force_download: bool = False,
resume_download: bool = False, resume_download: Optional[bool] = None,
proxies: Optional[Dict[str, str]] = None, proxies: Optional[Dict[str, str]] = None,
token: Optional[Union[bool, str]] = None, token: Optional[Union[bool, str]] = None,
revision: Optional[str] = None, revision: Optional[str] = None,
...@@ -165,8 +165,9 @@ def get_feature_extractor_config( ...@@ -165,8 +165,9 @@ def get_feature_extractor_config(
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the configuration files and override the cached versions if they Whether or not to force to (re-)download the configuration files and override the cached versions if they
exist. exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file exists. Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
...@@ -278,9 +279,9 @@ class AutoFeatureExtractor: ...@@ -278,9 +279,9 @@ class AutoFeatureExtractor:
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the feature extractor files and override the cached versions Whether or not to force to (re-)download the feature extractor files and override the cached versions
if they exist. if they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file Deprecated and ignored. All downloads are now resumed by default when possible.
exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
......
...@@ -159,7 +159,7 @@ def get_image_processor_config( ...@@ -159,7 +159,7 @@ def get_image_processor_config(
pretrained_model_name_or_path: Union[str, os.PathLike], pretrained_model_name_or_path: Union[str, os.PathLike],
cache_dir: Optional[Union[str, os.PathLike]] = None, cache_dir: Optional[Union[str, os.PathLike]] = None,
force_download: bool = False, force_download: bool = False,
resume_download: bool = False, resume_download: Optional[bool] = None,
proxies: Optional[Dict[str, str]] = None, proxies: Optional[Dict[str, str]] = None,
token: Optional[Union[bool, str]] = None, token: Optional[Union[bool, str]] = None,
revision: Optional[str] = None, revision: Optional[str] = None,
...@@ -184,8 +184,9 @@ def get_image_processor_config( ...@@ -184,8 +184,9 @@ def get_image_processor_config(
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the configuration files and override the cached versions if they Whether or not to force to (re-)download the configuration files and override the cached versions if they
exist. exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file exists. Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
...@@ -297,9 +298,9 @@ class AutoImageProcessor: ...@@ -297,9 +298,9 @@ class AutoImageProcessor:
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the image processor files and override the cached versions if Whether or not to force to (re-)download the image processor files and override the cached versions if
they exist. they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file Deprecated and ignored. All downloads are now resumed by default when possible.
exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
......
...@@ -167,9 +167,9 @@ class AutoProcessor: ...@@ -167,9 +167,9 @@ class AutoProcessor:
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the feature extractor files and override the cached versions Whether or not to force to (re-)download the feature extractor files and override the cached versions
if they exist. if they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file Deprecated and ignored. All downloads are now resumed by default when possible.
exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
......
...@@ -556,7 +556,7 @@ def get_tokenizer_config( ...@@ -556,7 +556,7 @@ def get_tokenizer_config(
pretrained_model_name_or_path: Union[str, os.PathLike], pretrained_model_name_or_path: Union[str, os.PathLike],
cache_dir: Optional[Union[str, os.PathLike]] = None, cache_dir: Optional[Union[str, os.PathLike]] = None,
force_download: bool = False, force_download: bool = False,
resume_download: bool = False, resume_download: Optional[bool] = None,
proxies: Optional[Dict[str, str]] = None, proxies: Optional[Dict[str, str]] = None,
token: Optional[Union[bool, str]] = None, token: Optional[Union[bool, str]] = None,
revision: Optional[str] = None, revision: Optional[str] = None,
...@@ -582,8 +582,9 @@ def get_tokenizer_config( ...@@ -582,8 +582,9 @@ def get_tokenizer_config(
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the configuration files and override the cached versions if they Whether or not to force to (re-)download the configuration files and override the cached versions if they
exist. exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file exists. Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
...@@ -708,9 +709,9 @@ class AutoTokenizer: ...@@ -708,9 +709,9 @@ class AutoTokenizer:
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force the (re-)download the model weights and configuration files and override the Whether or not to force the (re-)download the model weights and configuration files and override the
cached versions if they exist. cached versions if they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received files. Will attempt to resume the download if such a Deprecated and ignored. All downloads are now resumed by default when possible.
file exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
......
...@@ -92,7 +92,7 @@ class BarkProcessor(ProcessorMixin): ...@@ -92,7 +92,7 @@ class BarkProcessor(ProcessorMixin):
cache_dir=kwargs.pop("cache_dir", None), cache_dir=kwargs.pop("cache_dir", None),
force_download=kwargs.pop("force_download", False), force_download=kwargs.pop("force_download", False),
proxies=kwargs.pop("proxies", None), proxies=kwargs.pop("proxies", None),
resume_download=kwargs.pop("resume_download", False), resume_download=kwargs.pop("resume_download", None),
local_files_only=kwargs.pop("local_files_only", False), local_files_only=kwargs.pop("local_files_only", False),
token=kwargs.pop("use_auth_token", None), token=kwargs.pop("use_auth_token", None),
revision=kwargs.pop("revision", None), revision=kwargs.pop("revision", None),
...@@ -188,7 +188,7 @@ class BarkProcessor(ProcessorMixin): ...@@ -188,7 +188,7 @@ class BarkProcessor(ProcessorMixin):
cache_dir=kwargs.pop("cache_dir", None), cache_dir=kwargs.pop("cache_dir", None),
force_download=kwargs.pop("force_download", False), force_download=kwargs.pop("force_download", False),
proxies=kwargs.pop("proxies", None), proxies=kwargs.pop("proxies", None),
resume_download=kwargs.pop("resume_download", False), resume_download=kwargs.pop("resume_download", None),
local_files_only=kwargs.pop("local_files_only", False), local_files_only=kwargs.pop("local_files_only", False),
token=kwargs.pop("use_auth_token", None), token=kwargs.pop("use_auth_token", None),
revision=kwargs.pop("revision", None), revision=kwargs.pop("revision", None),
......
...@@ -1560,9 +1560,9 @@ class Wav2Vec2PreTrainedModel(PreTrainedModel): ...@@ -1560,9 +1560,9 @@ class Wav2Vec2PreTrainedModel(PreTrainedModel):
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force the (re-)download of the model weights and configuration files, overriding the Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist. cached versions if they exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received files. Will attempt to resume the download if such a Deprecated and ignored. All downloads are now resumed by default when possible.
file exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
...@@ -1616,7 +1616,7 @@ class Wav2Vec2PreTrainedModel(PreTrainedModel): ...@@ -1616,7 +1616,7 @@ class Wav2Vec2PreTrainedModel(PreTrainedModel):
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
local_files_only = kwargs.pop("local_files_only", False) local_files_only = kwargs.pop("local_files_only", False)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
......
...@@ -273,7 +273,7 @@ class ProcessorMixin(PushToHubMixin): ...@@ -273,7 +273,7 @@ class ProcessorMixin(PushToHubMixin):
""" """
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
local_files_only = kwargs.pop("local_files_only", False) local_files_only = kwargs.pop("local_files_only", False)
......
...@@ -1904,9 +1904,9 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin): ...@@ -1904,9 +1904,9 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force the (re-)download the vocabulary files and override the cached versions if they Whether or not to force the (re-)download the vocabulary files and override the cached versions if they
exist. exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received files. Attempt to resume the download if such a file Deprecated and ignored. All downloads are now resumed by default when possible.
exists. Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
...@@ -1961,7 +1961,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin): ...@@ -1961,7 +1961,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
# Otherwise use tokenizer.add_special_tokens({'unk_token': '<unk>'}) instead) # Otherwise use tokenizer.add_special_tokens({'unk_token': '<unk>'}) instead)
assert tokenizer.unk_token == "<unk>" assert tokenizer.unk_token == "<unk>"
```""" ```"""
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
use_auth_token = kwargs.pop("use_auth_token", None) use_auth_token = kwargs.pop("use_auth_token", None)
subfolder = kwargs.pop("subfolder", None) subfolder = kwargs.pop("subfolder", None)
......
...@@ -268,7 +268,7 @@ def cached_file( ...@@ -268,7 +268,7 @@ def cached_file(
filename: str, filename: str,
cache_dir: Optional[Union[str, os.PathLike]] = None, cache_dir: Optional[Union[str, os.PathLike]] = None,
force_download: bool = False, force_download: bool = False,
resume_download: bool = False, resume_download: Optional[bool] = None,
proxies: Optional[Dict[str, str]] = None, proxies: Optional[Dict[str, str]] = None,
token: Optional[Union[bool, str]] = None, token: Optional[Union[bool, str]] = None,
revision: Optional[str] = None, revision: Optional[str] = None,
...@@ -299,8 +299,9 @@ def cached_file( ...@@ -299,8 +299,9 @@ def cached_file(
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the configuration files and override the cached versions if they Whether or not to force to (re-)download the configuration files and override the cached versions if they
exist. exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file exists. Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
...@@ -474,7 +475,7 @@ def get_file_from_repo( ...@@ -474,7 +475,7 @@ def get_file_from_repo(
filename: str, filename: str,
cache_dir: Optional[Union[str, os.PathLike]] = None, cache_dir: Optional[Union[str, os.PathLike]] = None,
force_download: bool = False, force_download: bool = False,
resume_download: bool = False, resume_download: Optional[bool] = None,
proxies: Optional[Dict[str, str]] = None, proxies: Optional[Dict[str, str]] = None,
token: Optional[Union[bool, str]] = None, token: Optional[Union[bool, str]] = None,
revision: Optional[str] = None, revision: Optional[str] = None,
...@@ -499,8 +500,9 @@ def get_file_from_repo( ...@@ -499,8 +500,9 @@ def get_file_from_repo(
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the configuration files and override the cached versions if they Whether or not to force to (re-)download the configuration files and override the cached versions if they
exist. exist.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file exists. Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
...@@ -977,7 +979,7 @@ def get_checkpoint_shard_files( ...@@ -977,7 +979,7 @@ def get_checkpoint_shard_files(
cache_dir=None, cache_dir=None,
force_download=False, force_download=False,
proxies=None, proxies=None,
resume_download=False, resume_download=None,
local_files_only=False, local_files_only=False,
token=None, token=None,
user_agent=None, user_agent=None,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment