Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
babd41e7
Commit
babd41e7
authored
Jan 24, 2020
by
Lysandre
Browse files
Code quality
parent
974d083c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/transformers/configuration_utils.py
src/transformers/configuration_utils.py
+3
-3
No files found.
src/transformers/configuration_utils.py
View file @
babd41e7
...
...
@@ -117,7 +117,7 @@ class PretrainedConfig(object):
logger
.
info
(
"Configuration saved in {}"
.
format
(
output_config_file
))
@
classmethod
def
from_pretrained
(
cls
,
pretrained_model_name_or_path
,
**
kwargs
)
->
'
PretrainedConfig
'
:
def
from_pretrained
(
cls
,
pretrained_model_name_or_path
,
**
kwargs
)
->
"
PretrainedConfig
"
:
r
"""
Instantiate a :class:`~transformers.PretrainedConfig` (or a derived class) from a pre-trained model configuration.
...
...
@@ -255,7 +255,7 @@ class PretrainedConfig(object):
return
config_dict
,
kwargs
@
classmethod
def
from_dict
(
cls
,
config_dict
:
Dict
,
**
kwargs
)
->
'
PretrainedConfig
'
:
def
from_dict
(
cls
,
config_dict
:
Dict
,
**
kwargs
)
->
"
PretrainedConfig
"
:
"""
Constructs a `Config` from a Python dictionary of parameters.
...
...
@@ -293,7 +293,7 @@ class PretrainedConfig(object):
return
config
@
classmethod
def
from_json_file
(
cls
,
json_file
:
str
)
->
'
PretrainedConfig
'
:
def
from_json_file
(
cls
,
json_file
:
str
)
->
"
PretrainedConfig
"
:
"""
Constructs a `Config` from the path to a json file of parameters.
...
...
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