Skip to content

Commit

Permalink
Fix typos (#963)
Browse files Browse the repository at this point in the history
  • Loading branch information
regisss authored Apr 11, 2023
1 parent 97069a0 commit 2105a8a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion optimum/commands/export/tflite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
),
)
Expand Down
6 changes: 3 additions & 3 deletions optimum/exporters/tflite/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion optimum/exporters/tflite/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion optimum/utils/preprocessing/text_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2105a8a

Please sign in to comment.