From 2105a8ac311168b05ca433f8a38774698c666211 Mon Sep 17 00:00:00 2001 From: regisss <15324346+regisss@users.noreply.github.com> Date: Tue, 11 Apr 2023 19:03:20 +0200 Subject: [PATCH] Fix typos (#963) --- optimum/commands/export/tflite.py | 2 +- optimum/exporters/tflite/base.py | 6 +++--- optimum/exporters/tflite/convert.py | 2 +- optimum/utils/preprocessing/text_classification.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/optimum/commands/export/tflite.py b/optimum/commands/export/tflite.py index de453c0fb0..bae5042ef7 100644 --- a/optimum/commands/export/tflite.py +++ b/optimum/commands/export/tflite.py @@ -164,7 +164,7 @@ def parse_args_tflite(parser: "ArgumentParser"): type=str, default=None, help=( - "The dataset to use to calibration integer ranges when quantizing the model. This is needed to perform " + "The dataset to use to calibrate integer ranges when quantizing the model. This is needed to perform " "static quantization." ), ) diff --git a/optimum/exporters/tflite/base.py b/optimum/exporters/tflite/base.py index 934b444d78..46970bc970 100644 --- a/optimum/exporters/tflite/base.py +++ b/optimum/exporters/tflite/base.py @@ -67,17 +67,17 @@ class TFLiteQuantizationConfig: Allows to fallback to float kernels in quantization. inputs_dtype (`Optional[str]`, defaults to `None`): The data type of the inputs. If specified it must be either "int8" or "uint8". It allows to always take - integers as inputs, it is useful for interger-only hardware. + integers as inputs, it is useful for integer-only hardware. outputs_dtype (`Optional[str]`, defaults to `None`): The data type of the outputs. If specified it must be either "int8" or "uint8". It allows to always output - integers, it is useful for interger-only hardware. + integers, it is useful for integer-only hardware. calibration_dataset_name_or_path (`Optional[Union[str, Path]]`, defaults to `None`): The dataset to use for calibrating the quantization parameters for static quantization. If left unspecified, a default dataset for the considered task will be used. calibration_dataset_config_name (`Optional[str]`, defaults to `None`): The configuration name of the dataset if needed. num_calibration_samples (`int`, defaults to `200`): - The number of example from the calibration dataset to use to compute the quantization parameters. + The number of examples from the calibration dataset to use to compute the quantization parameters. calibration_split (`Optional[str]`, defaults to `None`): The split of the dataset to use. If none is specified and the dataset contains multiple splits, the smallest split will be used. diff --git a/optimum/exporters/tflite/convert.py b/optimum/exporters/tflite/convert.py index 7494c32b46..c1a2010355 100644 --- a/optimum/exporters/tflite/convert.py +++ b/optimum/exporters/tflite/convert.py @@ -185,7 +185,7 @@ def prepare_converter_for_quantization( # Handling the calibration dataset: # - Either loading the default dataset if no calibration dataset was provided or the required dataset, - # - Splitting the dataset with the provided a dataset split or with the first split if none is provided. + # - Splitting the dataset with the provided dataset split or with the first split if none is provided. # - Shuffling the split. # - Selecting num_calibration_samples in the dataset split. # - Batching the dataset. diff --git a/optimum/utils/preprocessing/text_classification.py b/optimum/utils/preprocessing/text_classification.py index 17933dc049..3e95d20469 100644 --- a/optimum/utils/preprocessing/text_classification.py +++ b/optimum/utils/preprocessing/text_classification.py @@ -79,7 +79,7 @@ def try_to_guess_data_keys(self, column_names: List[str]) -> Optional[Dict[str, return None elif secondary_key_name is None: logger.info( - "Could not infer the secondary key in the dataset, if it does contain one, please provided it manually." + "Could not infer the secondary key in the dataset, if it does contain one, please provide it manually." ) return {"primary": primary_key_name} else: