Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
8d742076
Unverified
Commit
8d742076
authored
Mar 18, 2022
by
Sylvain Gugger
Committed by
GitHub
Mar 18, 2022
Browse files
Small fixes to the documentation (#16180)
parent
ffc319e7
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
21 additions
and
21 deletions
+21
-21
src/transformers/configuration_utils.py
src/transformers/configuration_utils.py
+1
-1
src/transformers/dynamic_module_utils.py
src/transformers/dynamic_module_utils.py
+2
-2
src/transformers/feature_extraction_utils.py
src/transformers/feature_extraction_utils.py
+1
-1
src/transformers/file_utils.py
src/transformers/file_utils.py
+1
-1
src/transformers/modeling_flax_utils.py
src/transformers/modeling_flax_utils.py
+1
-1
src/transformers/modeling_tf_utils.py
src/transformers/modeling_tf_utils.py
+2
-2
src/transformers/modeling_utils.py
src/transformers/modeling_utils.py
+4
-4
src/transformers/models/auto/auto_factory.py
src/transformers/models/auto/auto_factory.py
+3
-3
src/transformers/models/auto/configuration_auto.py
src/transformers/models/auto/configuration_auto.py
+1
-1
src/transformers/models/auto/feature_extraction_auto.py
src/transformers/models/auto/feature_extraction_auto.py
+2
-2
src/transformers/models/auto/tokenization_auto.py
src/transformers/models/auto/tokenization_auto.py
+2
-2
src/transformers/tokenization_utils_base.py
src/transformers/tokenization_utils_base.py
+1
-1
No files found.
src/transformers/configuration_utils.py
View file @
8d742076
...
@@ -473,7 +473,7 @@ class PretrainedConfig(PushToHubMixin):
...
@@ -473,7 +473,7 @@ class PretrainedConfig(PushToHubMixin):
use_auth_token (`str` or *bool*, *optional*):
use_auth_token (`str` or *bool*, *optional*):
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
when running `transformers-cli login` (stored in `~/.huggingface`).
when running `transformers-cli login` (stored in `~/.huggingface`).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
...
src/transformers/dynamic_module_utils.py
View file @
8d742076
...
@@ -190,7 +190,7 @@ def get_cached_module_file(
...
@@ -190,7 +190,7 @@ def get_cached_module_file(
use_auth_token (`str` or *bool*, *optional*):
use_auth_token (`str` or *bool*, *optional*):
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
when running `transformers-cli login` (stored in `~/.huggingface`).
when running `transformers-cli login` (stored in `~/.huggingface`).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
@@ -340,7 +340,7 @@ def get_class_from_dynamic_module(
...
@@ -340,7 +340,7 @@ def get_class_from_dynamic_module(
use_auth_token (`str` or `bool`, *optional*):
use_auth_token (`str` or `bool`, *optional*):
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
when running `transformers-cli login` (stored in `~/.huggingface`).
when running `transformers-cli login` (stored in `~/.huggingface`).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
...
src/transformers/feature_extraction_utils.py
View file @
8d742076
...
@@ -261,7 +261,7 @@ class FeatureExtractionMixin(PushToHubMixin):
...
@@ -261,7 +261,7 @@ class FeatureExtractionMixin(PushToHubMixin):
use_auth_token (`str` or *bool*, *optional*):
use_auth_token (`str` or *bool*, *optional*):
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
when running `transformers-cli login` (stored in `~/.huggingface`).
when running `transformers-cli login` (stored in `~/.huggingface`).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
...
src/transformers/file_utils.py
View file @
8d742076
...
@@ -2295,7 +2295,7 @@ def get_file_from_repo(
...
@@ -2295,7 +2295,7 @@ def get_file_from_repo(
use_auth_token (`str` or *bool*, *optional*):
use_auth_token (`str` or *bool*, *optional*):
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
when running `transformers-cli login` (stored in `~/.huggingface`).
when running `transformers-cli login` (stored in `~/.huggingface`).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
...
src/transformers/modeling_flax_utils.py
View file @
8d742076
...
@@ -373,7 +373,7 @@ class FlaxPreTrainedModel(PushToHubMixin, FlaxGenerationMixin):
...
@@ -373,7 +373,7 @@ class FlaxPreTrainedModel(PushToHubMixin, FlaxGenerationMixin):
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
local_files_only(`bool`, *optional*, defaults to `False`):
local_files_only(`bool`, *optional*, defaults to `False`):
Whether or not to only look at local files (i.e., do not try to download the model).
Whether or not to only look at local files (i.e., do not try to download the model).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
...
src/transformers/modeling_tf_utils.py
View file @
8d742076
...
@@ -1506,11 +1506,11 @@ class TFPreTrainedModel(tf.keras.Model, TFModelUtilsMixin, TFGenerationMixin, Pu
...
@@ -1506,11 +1506,11 @@ class TFPreTrainedModel(tf.keras.Model, TFModelUtilsMixin, TFGenerationMixin, Pu
use_auth_token (`str` or *bool*, *optional*):
use_auth_token (`str` or *bool*, *optional*):
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
when running `transformers-cli login` (stored in `~/.huggingface`).
when running `transformers-cli login` (stored in `~/.huggingface`).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
mirror(`str`, *optional*):
mirror
(`str`, *optional*):
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.
Please refer to the mirror site for more information.
...
...
src/transformers/modeling_utils.py
View file @
8d742076
...
@@ -1173,17 +1173,17 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
...
@@ -1173,17 +1173,17 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
use_auth_token (`str` or *bool*, *optional*):
use_auth_token (`str` or *bool*, *optional*):
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
when running `transformers-cli login` (stored in `~/.huggingface`).
when running `transformers-cli login` (stored in `~/.huggingface`).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
mirror(`str`, *optional*):
mirror
(`str`, *optional*):
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.
Please refer to the mirror site for more information.
_fast_init(`bool`, *optional*, defaults to
``
`True`):
_fast_init(`bool`, *optional*, defaults to `True`):
Whether or not to disable fast initialization.
Whether or not to disable fast initialization.
low_cpu_mem_usage(`bool``, *optional*, defaults to
``
`False`):
low_cpu_mem_usage(`bool``, *optional*, defaults to `False`):
Tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model.
Tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model.
This is an experimental feature and a subject to change at any moment.
This is an experimental feature and a subject to change at any moment.
torch_dtype (`str` or `torch.dtype`, *optional*):
torch_dtype (`str` or `torch.dtype`, *optional*):
...
...
src/transformers/models/auto/auto_factory.py
View file @
8d742076
...
@@ -120,7 +120,7 @@ FROM_PRETRAINED_TORCH_DOCSTRING = """
...
@@ -120,7 +120,7 @@ FROM_PRETRAINED_TORCH_DOCSTRING = """
Whether ot not to also return a dictionary containing missing keys, unexpected keys and error messages.
Whether ot not to also return a dictionary containing missing keys, unexpected keys and error messages.
local_files_only(`bool`, *optional*, defaults to `False`):
local_files_only(`bool`, *optional*, defaults to `False`):
Whether or not to only look at local files (e.g., not try downloading the model).
Whether or not to only look at local files (e.g., not try downloading the model).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
@@ -216,7 +216,7 @@ FROM_PRETRAINED_TF_DOCSTRING = """
...
@@ -216,7 +216,7 @@ FROM_PRETRAINED_TF_DOCSTRING = """
Whether ot not to also return a dictionary containing missing keys, unexpected keys and error messages.
Whether ot not to also return a dictionary containing missing keys, unexpected keys and error messages.
local_files_only(`bool`, *optional*, defaults to `False`):
local_files_only(`bool`, *optional*, defaults to `False`):
Whether or not to only look at local files (e.g., not try downloading the model).
Whether or not to only look at local files (e.g., not try downloading the model).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
@@ -312,7 +312,7 @@ FROM_PRETRAINED_FLAX_DOCSTRING = """
...
@@ -312,7 +312,7 @@ FROM_PRETRAINED_FLAX_DOCSTRING = """
Whether ot not to also return a dictionary containing missing keys, unexpected keys and error messages.
Whether ot not to also return a dictionary containing missing keys, unexpected keys and error messages.
local_files_only(`bool`, *optional*, defaults to `False`):
local_files_only(`bool`, *optional*, defaults to `False`):
Whether or not to only look at local files (e.g., not try downloading the model).
Whether or not to only look at local files (e.g., not try downloading the model).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
...
src/transformers/models/auto/configuration_auto.py
View file @
8d742076
...
@@ -588,7 +588,7 @@ class AutoConfig:
...
@@ -588,7 +588,7 @@ class AutoConfig:
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.
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
...
src/transformers/models/auto/feature_extraction_auto.py
View file @
8d742076
...
@@ -117,7 +117,7 @@ def get_feature_extractor_config(
...
@@ -117,7 +117,7 @@ def get_feature_extractor_config(
use_auth_token (`str` or *bool*, *optional*):
use_auth_token (`str` or *bool*, *optional*):
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
when running `transformers-cli login` (stored in `~/.huggingface`).
when running `transformers-cli login` (stored in `~/.huggingface`).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
@@ -222,7 +222,7 @@ class AutoFeatureExtractor:
...
@@ -222,7 +222,7 @@ class AutoFeatureExtractor:
use_auth_token (`str` or *bool*, *optional*):
use_auth_token (`str` or *bool*, *optional*):
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
when running `transformers-cli login` (stored in `~/.huggingface`).
when running `transformers-cli login` (stored in `~/.huggingface`).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
...
src/transformers/models/auto/tokenization_auto.py
View file @
8d742076
...
@@ -299,7 +299,7 @@ def get_tokenizer_config(
...
@@ -299,7 +299,7 @@ def get_tokenizer_config(
use_auth_token (`str` or *bool*, *optional*):
use_auth_token (`str` or *bool*, *optional*):
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
when running `transformers-cli login` (stored in `~/.huggingface`).
when running `transformers-cli login` (stored in `~/.huggingface`).
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
@@ -403,7 +403,7 @@ class AutoTokenizer:
...
@@ -403,7 +403,7 @@ class AutoTokenizer:
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.
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
...
src/transformers/tokenization_utils_base.py
View file @
8d742076
...
@@ -1584,7 +1584,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
...
@@ -1584,7 +1584,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
when running `transformers-cli login` (stored in `~/.huggingface`).
when running `transformers-cli login` (stored in `~/.huggingface`).
local_files_only (`bool`, *optional*, defaults to `False`):
local_files_only (`bool`, *optional*, defaults to `False`):
Whether or not to only rely on local files and not to attempt to download any files.
Whether or not to only rely on local files and not to attempt to download any files.
revision(`str`, *optional*, defaults to `"main"`):
revision
(`str`, *optional*, defaults to `"main"`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
identifier allowed by git.
identifier allowed by git.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment