@@ -122,7 +122,7 @@ def get_default_model(targeted_task: Dict, framework: Optional[str], task_option
122
122
123
123
Args:
124
124
targeted_task (:obj:`Dict` ):
125
- Dictionnary representing the given task, that should contain default models
125
+ Dictionary representing the given task, that should contain default models
126
126
127
127
framework (:obj:`str`, None)
128
128
"pt", "tf" or None, representing a specific framework if it was specified, or None if we don't know yet.
@@ -150,9 +150,7 @@ def get_default_model(targeted_task: Dict, framework: Optional[str], task_option
150
150
else :
151
151
# XXX This error message needs to be updated to be more generic if more tasks are going to become
152
152
# parametrized
153
- raise ValueError (
154
- 'The task defaults can\' t be correctly selectionned. You probably meant "translation_XX_to_YY"'
155
- )
153
+ raise ValueError ('The task defaults can\' t be correctly selected. You probably meant "translation_XX_to_YY"' )
156
154
157
155
if framework is None :
158
156
framework = "pt"
@@ -695,7 +693,7 @@ def _forward(self, inputs, return_tensors=False):
695
693
Internal framework specific forward dispatching
696
694
697
695
Args:
698
- inputs: dict holding all the keyworded arguments for required by the model forward method.
696
+ inputs: dict holding all the keyword arguments for required by the model forward method.
699
697
return_tensors: Whether to return native framework (pt/tf) tensors rather than numpy array
700
698
701
699
Returns:
@@ -874,7 +872,7 @@ def __call__(
874
872
args (:obj:`str` or :obj:`List[str]`):
875
873
One or several prompts (or one list of prompts) to complete.
876
874
return_tensors (:obj:`bool`, `optional`, defaults to :obj:`False`):
877
- Whether or not to include the tensors of predictions (as token indinces ) in the outputs.
875
+ Whether or not to include the tensors of predictions (as token indices ) in the outputs.
878
876
return_text (:obj:`bool`, `optional`, defaults to :obj:`True`):
879
877
Whether or not to include the decoded texts in the outputs.
880
878
clean_up_tokenization_spaces (:obj:`bool`, `optional`, defaults to :obj:`False`):
@@ -1710,7 +1708,7 @@ def __call__(self, *args, **kwargs):
1710
1708
question (:obj:`str` or :obj:`List[str]`):
1711
1709
One or several question(s) (must be used in conjunction with the :obj:`context` argument).
1712
1710
context (:obj:`str` or :obj:`List[str]`):
1713
- One or several context(s) associated with the qustion (s) (must be used in conjunction with the
1711
+ One or several context(s) associated with the question (s) (must be used in conjunction with the
1714
1712
:obj:`question` argument).
1715
1713
topk (:obj:`int`, `optional`, defaults to 1):
1716
1714
The number of answers to return (will be chosen by order of likelihood).
@@ -1959,7 +1957,7 @@ def __call__(
1959
1957
return_text (:obj:`bool`, `optional`, defaults to :obj:`True`):
1960
1958
Whether or not to include the decoded texts in the outputs
1961
1959
return_tensors (:obj:`bool`, `optional`, defaults to :obj:`False`):
1962
- Whether or not to include the tensors of predictions (as token indinces ) in the outputs.
1960
+ Whether or not to include the tensors of predictions (as token indices ) in the outputs.
1963
1961
clean_up_tokenization_spaces (:obj:`bool`, `optional`, defaults to :obj:`False`):
1964
1962
Whether or not to clean up the potential extra spaces in the text output.
1965
1963
generate_kwargs:
@@ -2077,7 +2075,7 @@ def __call__(
2077
2075
args (:obj:`str` or :obj:`List[str]`):
2078
2076
Texts to be translated.
2079
2077
return_tensors (:obj:`bool`, `optional`, defaults to :obj:`False`):
2080
- Whether or not to include the tensors of predictions (as token indinces ) in the outputs.
2078
+ Whether or not to include the tensors of predictions (as token indices ) in the outputs.
2081
2079
return_text (:obj:`bool`, `optional`, defaults to :obj:`True`):
2082
2080
Whether or not to include the decoded texts in the outputs.
2083
2081
clean_up_tokenization_spaces (:obj:`bool`, `optional`, defaults to :obj:`False`):
@@ -2188,7 +2186,7 @@ def __call__(
2188
2186
args (:obj:`str` or :obj:`List[str]`):
2189
2187
Input text for the encoder.
2190
2188
return_tensors (:obj:`bool`, `optional`, defaults to :obj:`False`):
2191
- Whether or not to include the tensors of predictions (as token indinces ) in the outputs.
2189
+ Whether or not to include the tensors of predictions (as token indices ) in the outputs.
2192
2190
return_text (:obj:`bool`, `optional`, defaults to :obj:`True`):
2193
2191
Whether or not to include the decoded texts in the outputs.
2194
2192
clean_up_tokenization_spaces (:obj:`bool`, `optional`, defaults to :obj:`False`):
@@ -2253,8 +2251,8 @@ class Conversation:
2253
2251
:class:`~transformers.ConversationalPipeline`. The conversation contains a number of utility function to manage the
2254
2252
addition of new user input and generated model responses. A conversation needs to contain an unprocessed user input
2255
2253
before being passed to the :class:`~transformers.ConversationalPipeline`. This user input is either created when
2256
- the class is instantiated, or by calling :obj:`conversional_pipeline .append_response("input")` after a conversation
2257
- turn.
2254
+ the class is instantiated, or by calling :obj:`conversational_pipeline .append_response("input")` after a
2255
+ conversation turn.
2258
2256
2259
2257
Arguments:
2260
2258
text (:obj:`str`, `optional`):
@@ -2671,8 +2669,8 @@ def check_task(task: str) -> Tuple[Dict, Any]:
2671
2669
- :obj:`"conversational"`
2672
2670
2673
2671
Returns:
2674
- (task_defaults:obj:`dict`, task_options: (:obj:`tuple`, None)) The actual dictionnary required to initialize
2675
- the pipeline and some extra task options for parametrized tasks like "translation_XX_to_YY"
2672
+ (task_defaults:obj:`dict`, task_options: (:obj:`tuple`, None)) The actual dictionary required to initialize the
2673
+ pipeline and some extra task options for parametrized tasks like "translation_XX_to_YY"
2676
2674
2677
2675
2678
2676
"""
0 commit comments