Unverified Commit bd9d5126 authored by Kaito Sugimoto's avatar Kaito Sugimoto Committed by GitHub
Browse files

fix typo (#21042)

parent f93c90d2
......@@ -777,7 +777,7 @@ def load_tf_shard(model, model_layer_map, resolved_archive_file, ignore_mismatch
Args:
model (`tf.keras.models.Model`): Model in which the weights are loaded
model_layer_map (`Dict`): A dictionnary mapping the layer name to the index of the layer in the model.
model_layer_map (`Dict`): A dictionary mapping the layer name to the index of the layer in the model.
resolved_archive_file (`str`): Path to the checkpoint file from which the weights will be loaded
ignore_mismatched_sizes (`bool`, *optional*, defaults to `False`): Whether to ignore the mismatched keys
......
......@@ -1972,7 +1972,7 @@ class JukeboxPrior(PreTrainedModel):
def prior_preprocess(self, tokens, conds):
"""
Shifts the input tokens to account for the dictionnary merge. The embed_dim_shift give by how much the music
Shifts the input tokens to account for the dictionary merge. The embed_dim_shift give by how much the music
tokens should be shifted by. It is equal to `lyric_vocab_size`.
"""
batch_size = tokens[0].shape[0]
......
......@@ -306,7 +306,7 @@ class AutomaticSpeechRecognitionPipeline(ChunkPipeline):
# better integration
if not ("sampling_rate" in inputs and ("raw" in inputs or "array" in inputs)):
raise ValueError(
"When passing a dictionnary to AutomaticSpeechRecognitionPipeline, the dict needs to contain a "
"When passing a dictionary to AutomaticSpeechRecognitionPipeline, the dict needs to contain a "
'"raw" key containing the numpy array representing the audio and a "sampling_rate" key, '
"containing the sampling_rate associated with that array"
)
......
......@@ -945,7 +945,7 @@ class Pipeline(_ScikitCompat):
@abstractmethod
def preprocess(self, input_: Any, **preprocess_parameters: Dict) -> Dict[str, GenericTensor]:
"""
Preprocess will take the `input_` of a specific pipeline and return a dictionnary of everything necessary for
Preprocess will take the `input_` of a specific pipeline and return a dictionary of everything necessary for
`_forward` to run properly. It should contain at least one tensor, but might have arbitrary other items.
"""
raise NotImplementedError("preprocess not implemented")
......@@ -953,7 +953,7 @@ class Pipeline(_ScikitCompat):
@abstractmethod
def _forward(self, input_tensors: Dict[str, GenericTensor], **forward_parameters: Dict) -> ModelOutput:
"""
_forward will receive the prepared dictionnary from `preprocess` and run it on the model. This method might
_forward will receive the prepared dictionary from `preprocess` and run it on the model. This method might
involve the GPU or the CPU and should be agnostic to it. Isolating this function is the reason for `preprocess`
and `postprocess` to exist, so that the hot path, this method generally can run as fast as possible.
......
......@@ -125,7 +125,7 @@ class TextClassificationPipeline(Pipeline):
Args:
args (`str` or `List[str]` or `Dict[str]`, or `List[Dict[str]]`):
One or several texts to classify. In order to use text pairs for your classification, you can send a
dictionnary containing `{"text", "text_pair"}` keys, or a list of those.
dictionary containing `{"text", "text_pair"}` keys, or a list of those.
top_k (`int`, *optional*, defaults to `1`):
How many results to return.
function_to_apply (`str`, *optional*, defaults to `"default"`):
......@@ -174,7 +174,7 @@ class TextClassificationPipeline(Pipeline):
# This is likely an invalid usage of the pipeline attempting to pass text pairs.
raise ValueError(
"The pipeline received invalid inputs, if you are trying to send text pairs, you can try to send a"
' dictionnary `{"text": "My text", "text_pair": "My pair"}` in order to send a text pair.'
' dictionary `{"text": "My text", "text_pair": "My pair"}` in order to send a text pair.'
)
return self.tokenizer(inputs, return_tensors=return_tensors, **tokenizer_kwargs)
......
......@@ -89,7 +89,7 @@ class ZeroShotImageClassificationPipeline(ChunkPipeline):
logits_per_image
Return:
A list of dictionaries containing result, one dictionnary per proposed label. The dictionaries contain the
A list of dictionaries containing result, one dictionary per proposed label. The dictionaries contain the
following keys:
- **label** (`str`) -- The label identified by the model. It is one of the suggested `candidate_label`.
......
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