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
0842c33e
Unverified
Commit
0842c33e
authored
Feb 01, 2021
by
Suraj Patil
Committed by
GitHub
Feb 01, 2021
Browse files
fix typos (#9924)
parent
8672bcda
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
43 deletions
+34
-43
src/transformers/models/auto/modeling_auto.py
src/transformers/models/auto/modeling_auto.py
+18
-23
src/transformers/models/auto/modeling_tf_auto.py
src/transformers/models/auto/modeling_tf_auto.py
+16
-20
No files found.
src/transformers/models/auto/modeling_auto.py
View file @
0842c33e
...
@@ -678,7 +678,7 @@ class AutoModel:
...
@@ -678,7 +678,7 @@ class AutoModel:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the base model classes of the library when
This is a generic model class that will be instantiated as one of the base model classes of the library when
created with the :meth:`~transformers.AutoModel.from_pretrained` class method or the
created with the :meth:`~transformers.AutoModel.from_pretrained` class method or the
:meth:`~transformers.AutoModel.from_config` class method
s
.
:meth:`~transformers.AutoModel.from_config` class method.
This class cannot be instantiated directly using ``__init__()`` (throws an error).
This class cannot be instantiated directly using ``__init__()`` (throws an error).
"""
"""
...
@@ -768,7 +768,7 @@ class AutoModel:
...
@@ -768,7 +768,7 @@ class AutoModel:
class
AutoModelForPreTraining
:
class
AutoModelForPreTraining
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with the
This is a generic model class that will be instantiated as one of the model classes of the library---with the
architecture used for pretraining this model---when created with the
when created with the
architecture used for pretraining this model---when created with the
:meth:`~transformers.AutoModelForPreTraining.from_pretrained` class method or the
:meth:`~transformers.AutoModelForPreTraining.from_pretrained` class method or the
:meth:`~transformers.AutoModelForPreTraining.from_config` class method.
:meth:`~transformers.AutoModelForPreTraining.from_config` class method.
...
@@ -862,9 +862,8 @@ class AutoModelForPreTraining:
...
@@ -862,9 +862,8 @@ class AutoModelForPreTraining:
class
AutoModelWithLMHead
:
class
AutoModelWithLMHead
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a
This is a generic model class that will be instantiated as one of the model classes of the library---with a
language modeling head---when created with the when created with the
language modeling head---when created with the :meth:`~transformers.AutoModelWithLMHead.from_pretrained` class
:meth:`~transformers.AutoModelWithLMHead.from_pretrained` class method or the
method or the :meth:`~transformers.AutoModelWithLMHead.from_config` class method.
:meth:`~transformers.AutoModelWithLMHead.from_config` class method.
This class cannot be instantiated directly using ``__init__()`` (throws an error).
This class cannot be instantiated directly using ``__init__()`` (throws an error).
...
@@ -974,9 +973,8 @@ class AutoModelWithLMHead:
...
@@ -974,9 +973,8 @@ class AutoModelWithLMHead:
class
AutoModelForCausalLM
:
class
AutoModelForCausalLM
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a causal
This is a generic model class that will be instantiated as one of the model classes of the library---with a causal
language modeling head---when created with the when created with the
language modeling head---when created with the :meth:`~transformers.AutoModelForCausalLM.from_pretrained` class
:meth:`~transformers.AutoModelForCausalLM.from_pretrained` class method or the
method or the :meth:`~transformers.AutoModelForCausalLM.from_config` class method.
:meth:`~transformers.AutoModelForCausalLM.from_config` class method.
This class cannot be instantiated directly using ``__init__()`` (throws an error).
This class cannot be instantiated directly using ``__init__()`` (throws an error).
"""
"""
...
@@ -1068,9 +1066,8 @@ class AutoModelForCausalLM:
...
@@ -1068,9 +1066,8 @@ class AutoModelForCausalLM:
class
AutoModelForMaskedLM
:
class
AutoModelForMaskedLM
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a masked
This is a generic model class that will be instantiated as one of the model classes of the library---with a masked
language modeling head---when created with the when created with the
language modeling head---when created with the :meth:`~transformers.AutoModelForMaskedLM.from_pretrained` class
:meth:`~transformers.AutoModelForMaskedLM.from_pretrained` class method or the
method or the :meth:`~transformers.AutoModelForMaskedLM.from_config` class method.
:meth:`~transformers.AutoModelForMaskedLM.from_config` class method.
This class cannot be instantiated directly using ``__init__()`` (throws an error).
This class cannot be instantiated directly using ``__init__()`` (throws an error).
"""
"""
...
@@ -1162,7 +1159,7 @@ class AutoModelForMaskedLM:
...
@@ -1162,7 +1159,7 @@ class AutoModelForMaskedLM:
class
AutoModelForSeq2SeqLM
:
class
AutoModelForSeq2SeqLM
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a
This is a generic model class that will be instantiated as one of the model classes of the library---with a
sequence-to-sequence language modeling head---when created with the
when created with the
sequence-to-sequence language modeling head---when created with the
:meth:`~transformers.AutoModelForSeq2SeqLM.from_pretrained` class method or the
:meth:`~transformers.AutoModelForSeq2SeqLM.from_pretrained` class method or the
:meth:`~transformers.AutoModelForSeq2SeqLM.from_config` class method.
:meth:`~transformers.AutoModelForSeq2SeqLM.from_config` class method.
...
@@ -1260,7 +1257,7 @@ class AutoModelForSeq2SeqLM:
...
@@ -1260,7 +1257,7 @@ class AutoModelForSeq2SeqLM:
class
AutoModelForSequenceClassification
:
class
AutoModelForSequenceClassification
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a
This is a generic model class that will be instantiated as one of the model classes of the library---with a
sequence classification head---when created with the
when created with the
sequence classification head---when created with the
:meth:`~transformers.AutoModelForSequenceClassification.from_pretrained` class method or the
:meth:`~transformers.AutoModelForSequenceClassification.from_pretrained` class method or the
:meth:`~transformers.AutoModelForSequenceClassification.from_config` class method.
:meth:`~transformers.AutoModelForSequenceClassification.from_config` class method.
...
@@ -1358,9 +1355,8 @@ class AutoModelForSequenceClassification:
...
@@ -1358,9 +1355,8 @@ class AutoModelForSequenceClassification:
class
AutoModelForQuestionAnswering
:
class
AutoModelForQuestionAnswering
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a
This is a generic model class that will be instantiated as one of the model classes of the library---with a
question answering head---when created with the when created with the
question answering head---when created with the :meth:`~transformers.AutoModeForQuestionAnswering.from_pretrained`
:meth:`~transformers.AutoModeForQuestionAnswering.from_pretrained` class method or the
class method or the :meth:`~transformers.AutoModelForQuestionAnswering.from_config` class method.
:meth:`~transformers.AutoModelForQuestionAnswering.from_config` class method.
This class cannot be instantiated directly using ``__init__()`` (throws an error).
This class cannot be instantiated directly using ``__init__()`` (throws an error).
"""
"""
...
@@ -1457,7 +1453,7 @@ class AutoModelForQuestionAnswering:
...
@@ -1457,7 +1453,7 @@ class AutoModelForQuestionAnswering:
class
AutoModelForTableQuestionAnswering
:
class
AutoModelForTableQuestionAnswering
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a table
This is a generic model class that will be instantiated as one of the model classes of the library---with a table
question answering head---when created with the
when created with the
question answering head---when created with the
:meth:`~transformers.AutoModeForTableQuestionAnswering.from_pretrained` class method or the
:meth:`~transformers.AutoModeForTableQuestionAnswering.from_pretrained` class method or the
:meth:`~transformers.AutoModelForTableQuestionAnswering.from_config` class method.
:meth:`~transformers.AutoModelForTableQuestionAnswering.from_config` class method.
...
@@ -1557,9 +1553,8 @@ class AutoModelForTableQuestionAnswering:
...
@@ -1557,9 +1553,8 @@ class AutoModelForTableQuestionAnswering:
class
AutoModelForTokenClassification
:
class
AutoModelForTokenClassification
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a token
This is a generic model class that will be instantiated as one of the model classes of the library---with a token
classification head---when created with the when created with the
classification head---when created with the :meth:`~transformers.AutoModelForTokenClassification.from_pretrained`
:meth:`~transformers.AutoModelForTokenClassification.from_pretrained` class method or the
class method or the :meth:`~transformers.AutoModelForTokenClassification.from_config` class method.
:meth:`~transformers.AutoModelForTokenClassification.from_config` class method.
This class cannot be instantiated directly using ``__init__()`` (throws an error).
This class cannot be instantiated directly using ``__init__()`` (throws an error).
"""
"""
...
@@ -1656,7 +1651,7 @@ class AutoModelForTokenClassification:
...
@@ -1656,7 +1651,7 @@ class AutoModelForTokenClassification:
class
AutoModelForMultipleChoice
:
class
AutoModelForMultipleChoice
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a
This is a generic model class that will be instantiated as one of the model classes of the library---with a
multiple choice classification head---when created with the
when created with the
multiple choice classification head---when created with the
:meth:`~transformers.AutoModelForMultipleChoice.from_pretrained` class method or the
:meth:`~transformers.AutoModelForMultipleChoice.from_pretrained` class method or the
:meth:`~transformers.AutoModelForMultipleChoice.from_config` class method.
:meth:`~transformers.AutoModelForMultipleChoice.from_config` class method.
...
@@ -1755,8 +1750,8 @@ class AutoModelForMultipleChoice:
...
@@ -1755,8 +1750,8 @@ class AutoModelForMultipleChoice:
class
AutoModelForNextSentencePrediction
:
class
AutoModelForNextSentencePrediction
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a
This is a generic model class that will be instantiated as one of the model classes of the library---with a
next
multiple choice classif
ic
a
tion head---when created with the
when created with the
sentence pred
iction head---when created with the
:meth:`~transformers.AutoModelForNextSentencePrediction.from_pretrained` class method or the
:meth:`~transformers.AutoModelForNextSentencePrediction.from_pretrained` class method or the
:meth:`~transformers.AutoModelForNextSentencePrediction.from_config` class method.
:meth:`~transformers.AutoModelForNextSentencePrediction.from_config` class method.
...
...
src/transformers/models/auto/modeling_tf_auto.py
View file @
0842c33e
...
@@ -539,7 +539,7 @@ class TFAutoModel(object):
...
@@ -539,7 +539,7 @@ class TFAutoModel(object):
r
"""
r
"""
This is a generic model class that will be instantiated as one of the base model classes of the library when
This is a generic model class that will be instantiated as one of the base model classes of the library when
created with the when created with the :meth:`~transformers.TFAutoModel.from_pretrained` class method or the
created with the when created with the :meth:`~transformers.TFAutoModel.from_pretrained` class method or the
:meth:`~transformers.TFAutoModel.from_config` class method
s
.
:meth:`~transformers.TFAutoModel.from_config` class method.
This class cannot be instantiated directly using ``__init__()`` (throws an error).
This class cannot be instantiated directly using ``__init__()`` (throws an error).
"""
"""
...
@@ -629,7 +629,7 @@ class TFAutoModel(object):
...
@@ -629,7 +629,7 @@ class TFAutoModel(object):
class
TFAutoModelForPreTraining
(
object
):
class
TFAutoModelForPreTraining
(
object
):
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with the
This is a generic model class that will be instantiated as one of the model classes of the library---with the
architecture used for pretraining this model---when created with the
when created with the
architecture used for pretraining this model---when created with the
:meth:`~transformers.TFAutoModelForPreTraining.from_pretrained` class method or the
:meth:`~transformers.TFAutoModelForPreTraining.from_pretrained` class method or the
:meth:`~transformers.TFAutoModelForPreTraining.from_config` class method.
:meth:`~transformers.TFAutoModelForPreTraining.from_config` class method.
...
@@ -723,9 +723,8 @@ class TFAutoModelForPreTraining(object):
...
@@ -723,9 +723,8 @@ class TFAutoModelForPreTraining(object):
class
TFAutoModelWithLMHead
(
object
):
class
TFAutoModelWithLMHead
(
object
):
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a
This is a generic model class that will be instantiated as one of the model classes of the library---with a
language modeling head---when created with the when created with the
language modeling head---when created with the :meth:`~transformers.TFAutoModelWithLMHead.from_pretrained` class
:meth:`~transformers.TFAutoModelWithLMHead.from_pretrained` class method or the
method or the :meth:`~transformers.TFAutoModelWithLMHead.from_config` class method.
:meth:`~transformers.TFAutoModelWithLMHead.from_config` class method.
This class cannot be instantiated directly using ``__init__()`` (throws an error).
This class cannot be instantiated directly using ``__init__()`` (throws an error).
...
@@ -836,9 +835,8 @@ class TFAutoModelWithLMHead(object):
...
@@ -836,9 +835,8 @@ class TFAutoModelWithLMHead(object):
class
TFAutoModelForCausalLM
:
class
TFAutoModelForCausalLM
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a causal
This is a generic model class that will be instantiated as one of the model classes of the library---with a causal
language modeling head---when created with the when created with the
language modeling head---when created with the :meth:`~transformers.TFAutoModelForCausalLM.from_pretrained` class
:meth:`~transformers.TFAutoModelForCausalLM.from_pretrained` class method or the
method or the :meth:`~transformers.TFAutoModelForCausalLM.from_config` class method.
:meth:`~transformers.TFAutoModelForCausalLM.from_config` class method.
This class cannot be instantiated directly using ``__init__()`` (throws an error).
This class cannot be instantiated directly using ``__init__()`` (throws an error).
"""
"""
...
@@ -930,9 +928,8 @@ class TFAutoModelForCausalLM:
...
@@ -930,9 +928,8 @@ class TFAutoModelForCausalLM:
class
TFAutoModelForMaskedLM
:
class
TFAutoModelForMaskedLM
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a masked
This is a generic model class that will be instantiated as one of the model classes of the library---with a masked
language modeling head---when created with the when created with the
language modeling head---when created with the :meth:`~transformers.TFAutoModelForMaskedLM.from_pretrained` class
:meth:`~transformers.TFAutoModelForMaskedLM.from_pretrained` class method or the
method or the :meth:`~transformers.TFAutoModelForMaskedLM.from_config` class method.
:meth:`~transformers.TFAutoModelForMaskedLM.from_config` class method.
This class cannot be instantiated directly using ``__init__()`` (throws an error).
This class cannot be instantiated directly using ``__init__()`` (throws an error).
"""
"""
...
@@ -1024,7 +1021,7 @@ class TFAutoModelForMaskedLM:
...
@@ -1024,7 +1021,7 @@ class TFAutoModelForMaskedLM:
class
TFAutoModelForSeq2SeqLM
:
class
TFAutoModelForSeq2SeqLM
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a
This is a generic model class that will be instantiated as one of the model classes of the library---with a
sequence-to-sequence language modeling head---when created with the
when created with the
sequence-to-sequence language modeling head---when created with the
:meth:`~transformers.TFAutoModelForSeq2SeqLM.from_pretrained` class method or the
:meth:`~transformers.TFAutoModelForSeq2SeqLM.from_pretrained` class method or the
:meth:`~transformers.TFAutoModelForSeq2SeqLM.from_config` class method.
:meth:`~transformers.TFAutoModelForSeq2SeqLM.from_config` class method.
...
@@ -1122,7 +1119,7 @@ class TFAutoModelForSeq2SeqLM:
...
@@ -1122,7 +1119,7 @@ class TFAutoModelForSeq2SeqLM:
class
TFAutoModelForSequenceClassification
(
object
):
class
TFAutoModelForSequenceClassification
(
object
):
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a
This is a generic model class that will be instantiated as one of the model classes of the library---with a
sequence classification head---when created with the
when created with the
sequence classification head---when created with the
:meth:`~transformers.TFAutoModelForSequenceClassification.from_pretrained` class method or the
:meth:`~transformers.TFAutoModelForSequenceClassification.from_pretrained` class method or the
:meth:`~transformers.TFAutoModelForSequenceClassification.from_config` class method.
:meth:`~transformers.TFAutoModelForSequenceClassification.from_config` class method.
...
@@ -1220,7 +1217,7 @@ class TFAutoModelForSequenceClassification(object):
...
@@ -1220,7 +1217,7 @@ class TFAutoModelForSequenceClassification(object):
class
TFAutoModelForQuestionAnswering
(
object
):
class
TFAutoModelForQuestionAnswering
(
object
):
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a
This is a generic model class that will be instantiated as one of the model classes of the library---with a
question answering head---when created with the
when created with the
question answering head---when created with the
:meth:`~transformers.TFAutoModeForQuestionAnswering.from_pretrained` class method or the
:meth:`~transformers.TFAutoModeForQuestionAnswering.from_pretrained` class method or the
:meth:`~transformers.TFAutoModelForQuestionAnswering.from_config` class method.
:meth:`~transformers.TFAutoModelForQuestionAnswering.from_config` class method.
...
@@ -1317,9 +1314,8 @@ class TFAutoModelForQuestionAnswering(object):
...
@@ -1317,9 +1314,8 @@ class TFAutoModelForQuestionAnswering(object):
class
TFAutoModelForTokenClassification
:
class
TFAutoModelForTokenClassification
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a token
This is a generic model class that will be instantiated as one of the model classes of the library---with a token
classification head---when created with the when created with the
classification head---when created with the :meth:`~transformers.TFAutoModelForTokenClassification.from_pretrained`
:meth:`~transformers.TFAutoModelForTokenClassification.from_pretrained` class method or the
class method or the :meth:`~transformers.TFAutoModelForTokenClassification.from_config` class method.
:meth:`~transformers.TFAutoModelForTokenClassification.from_config` class method.
This class cannot be instantiated directly using ``__init__()`` (throws an error).
This class cannot be instantiated directly using ``__init__()`` (throws an error).
"""
"""
...
@@ -1414,7 +1410,7 @@ class TFAutoModelForTokenClassification:
...
@@ -1414,7 +1410,7 @@ class TFAutoModelForTokenClassification:
class
TFAutoModelForMultipleChoice
:
class
TFAutoModelForMultipleChoice
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a
This is a generic model class that will be instantiated as one of the model classes of the library---with a
multiple choice classification head---when created with the
when created with the
multiple choice classification head---when created with the
:meth:`~transformers.TFAutoModelForMultipleChoice.from_pretrained` class method or the
:meth:`~transformers.TFAutoModelForMultipleChoice.from_pretrained` class method or the
:meth:`~transformers.TFAutoModelForMultipleChoice.from_config` class method.
:meth:`~transformers.TFAutoModelForMultipleChoice.from_config` class method.
...
@@ -1511,8 +1507,8 @@ class TFAutoModelForMultipleChoice:
...
@@ -1511,8 +1507,8 @@ class TFAutoModelForMultipleChoice:
class
TFAutoModelForNextSentencePrediction
:
class
TFAutoModelForNextSentencePrediction
:
r
"""
r
"""
This is a generic model class that will be instantiated as one of the model classes of the library---with a
This is a generic model class that will be instantiated as one of the model classes of the library---with a
next
multiple choice classif
ic
a
tion head---when created with the
when created with the
sentence pred
iction head---when created with the
:meth:`~transformers.TFAutoModelForNextSentencePrediction.from_pretrained` class method or the
:meth:`~transformers.TFAutoModelForNextSentencePrediction.from_pretrained` class method or the
:meth:`~transformers.TFAutoModelForNextSentencePrediction.from_config` class method.
:meth:`~transformers.TFAutoModelForNextSentencePrediction.from_config` class method.
...
...
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