Parcourir la source

Fix typos in multiple files (#3952)

co63oc il y a 6 mois
Parent
commit
c029cd5665
27 fichiers modifiés avec 54 ajouts et 54 suppressions
  1. 2 2
      paddlex/modules/anomaly_detection/evaluator.py
  2. 2 2
      paddlex/modules/base/evaluator.py
  3. 2 2
      paddlex/modules/doc_vlm/dataset_checker.py
  4. 2 2
      paddlex/modules/doc_vlm/evaluator.py
  5. 2 2
      paddlex/modules/doc_vlm/exportor.py
  6. 2 2
      paddlex/modules/doc_vlm/trainer.py
  7. 2 2
      paddlex/modules/face_recognition/evaluator.py
  8. 2 2
      paddlex/modules/formula_recognition/evaluator.py
  9. 1 1
      paddlex/modules/general_recognition/evaluator.py
  10. 2 2
      paddlex/modules/image_classification/evaluator.py
  11. 1 1
      paddlex/modules/instance_segmentation/evaluator.py
  12. 1 1
      paddlex/modules/keypoint_detection/evaluator.py
  13. 2 2
      paddlex/modules/m_3d_bev_detection/evaluator.py
  14. 2 2
      paddlex/modules/multilabel_classification/evaluator.py
  15. 2 2
      paddlex/modules/object_detection/evaluator.py
  16. 2 2
      paddlex/modules/semantic_segmentation/evaluator.py
  17. 2 2
      paddlex/modules/table_recognition/evaluator.py
  18. 2 2
      paddlex/modules/text_detection/evaluator.py
  19. 2 2
      paddlex/modules/text_recognition/evaluator.py
  20. 2 2
      paddlex/modules/ts_anomaly_detection/evaluator.py
  21. 2 2
      paddlex/modules/ts_classification/evaluator.py
  22. 2 2
      paddlex/modules/ts_forecast/evaluator.py
  23. 2 2
      paddlex/modules/video_classification/evaluator.py
  24. 2 2
      paddlex/modules/video_detection/evaluator.py
  25. 3 3
      paddlex/repo_apis/PaddleTS_api/ts_ad/config.py
  26. 2 2
      paddlex/repo_apis/PaddleTS_api/ts_cls/config.py
  27. 4 4
      paddlex/repo_apis/PaddleTS_api/ts_fc/config.py

+ 2 - 2
paddlex/modules/anomaly_detection/evaluator.py

@@ -26,7 +26,7 @@ class UadEvaluator(BaseEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         self.pdx_config.update_dataset(self.global_config.dataset_dir, "SegDataset")
         self.pdx_config.update_pretrained_weights(None, is_backbone=True)
 
@@ -47,7 +47,7 @@ class UadEvaluator(BaseEvaluator):
         return config_path
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/base/evaluator.py

@@ -161,10 +161,10 @@ evaling!"
 
     @abstractmethod
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         raise NotImplementedError
 
     @abstractmethod
     def get_eval_kwargs(self):
-        """get key-value arguments of model evalution function"""
+        """get key-value arguments of model evaluation function"""
         raise NotImplementedError

+ 2 - 2
paddlex/modules/doc_vlm/dataset_checker.py

@@ -18,12 +18,12 @@ from .model_list import MODELS
 
 
 class DocVLMDatasetChecker(BaseDatasetChecker):
-    """Dataset Checker for Document Vision Languange Model"""
+    """Dataset Checker for Document Vision Language Model"""
 
     entities = MODELS
 
     def __init__(self, config):
         # not support for now
         raise UnsupportedAPIError(
-            "document vision languange models do not support data check for now."
+            "document vision language models do not support data check for now."
         )

+ 2 - 2
paddlex/modules/doc_vlm/evaluator.py

@@ -18,12 +18,12 @@ from .model_list import MODELS
 
 
 class DocVLMEvaluator(BaseEvaluator):
-    """Document Vision Languange Model Evaluator"""
+    """Document Vision Language Model Evaluator"""
 
     entities = MODELS
 
     def __init__(self, config):
         # not support for now
         raise UnsupportedAPIError(
-            "document vision languange models do not support evaluate for now."
+            "document vision language models do not support evaluate for now."
         )

+ 2 - 2
paddlex/modules/doc_vlm/exportor.py

@@ -18,12 +18,12 @@ from .model_list import MODELS
 
 
 class DocVLMExportor(BaseExportor):
-    """Document Vision Languange Model Exportor"""
+    """Document Vision Language Model Exportor"""
 
     entities = MODELS
 
     def __init__(self, config):
         # not support for now
         raise UnsupportedAPIError(
-            "document vision languange models do not support export for now."
+            "document vision language models do not support export for now."
         )

+ 2 - 2
paddlex/modules/doc_vlm/trainer.py

@@ -18,14 +18,14 @@ from .model_list import MODELS
 
 
 class DocVLMTrainer(BaseTrainer):
-    """Document Vision Languange Model Trainer"""
+    """Document Vision Language Model Trainer"""
 
     entities = MODELS
 
     def __init__(self, config):
         # not support for now
         raise UnsupportedAPIError(
-            "Document vision languange models do not support train for now."
+            "Document vision language models do not support train for now."
         )
 
     def update_config(self):

+ 2 - 2
paddlex/modules/face_recognition/evaluator.py

@@ -24,7 +24,7 @@ class FaceRecEvaluator(BaseEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
         self.update_dataset_cfg()
@@ -41,7 +41,7 @@ class FaceRecEvaluator(BaseEvaluator):
         self.pdx_config.update(ds_cfg)
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/formula_recognition/evaluator.py

@@ -25,7 +25,7 @@ class FormulaRecEvaluator(BaseEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
         if self.global_config["model"] == "LaTeX_OCR_rec":
@@ -66,7 +66,7 @@ class FormulaRecEvaluator(BaseEvaluator):
             self.pdx_config.update_delimiter(self.eval_config.delimiter, mode="eval")
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 1 - 1
paddlex/modules/general_recognition/evaluator.py

@@ -22,7 +22,7 @@ class ShiTuRecEvaluator(ClsEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
         self.pdx_config.update_dataset(

+ 2 - 2
paddlex/modules/image_classification/evaluator.py

@@ -22,7 +22,7 @@ class ClsEvaluator(BaseEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
         if self.pdx_config["Arch"]["name"] == "DistillationModel":
@@ -32,7 +32,7 @@ class ClsEvaluator(BaseEvaluator):
         self.pdx_config.update_pretrained_weights(self.eval_config.weight_path)
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 1 - 1
paddlex/modules/instance_segmentation/evaluator.py

@@ -23,7 +23,7 @@ class InstanceSegEvaluator(DetEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
         self.pdx_config.update_dataset(

+ 1 - 1
paddlex/modules/keypoint_detection/evaluator.py

@@ -23,7 +23,7 @@ class KeypointEvaluator(DetEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
         metric = self.pdx_config.metric

+ 2 - 2
paddlex/modules/m_3d_bev_detection/evaluator.py

@@ -23,7 +23,7 @@ class BEVFusionEvaluator(BaseEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.batch_size is not None:
             self.pdx_config.update_batch_size(self.eval_config.batch_size)
         self.pdx_config.update_dataset(
@@ -35,7 +35,7 @@ class BEVFusionEvaluator(BaseEvaluator):
         self.pdx_config.update_weights(self.eval_config.weight_path)
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/multilabel_classification/evaluator.py

@@ -22,7 +22,7 @@ class MLClsEvaluator(BaseEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
         if self.pdx_config["Arch"]["name"] == "DistillationModel":
@@ -32,7 +32,7 @@ class MLClsEvaluator(BaseEvaluator):
         self.pdx_config.update_pretrained_weights(self.eval_config.weight_path)
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/object_detection/evaluator.py

@@ -39,14 +39,14 @@ class DetEvaluator(BaseEvaluator):
         )
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
         self._update_dataset()
         self.pdx_config.update_weights(self.eval_config.weight_path)
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/semantic_segmentation/evaluator.py

@@ -26,7 +26,7 @@ class SegEvaluator(BaseEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         self.pdx_config.update_dataset(self.global_config.dataset_dir, "SegDataset")
         self.pdx_config.update_pretrained_weights(None, is_backbone=True)
 
@@ -47,7 +47,7 @@ class SegEvaluator(BaseEvaluator):
         return config_path
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/table_recognition/evaluator.py

@@ -23,7 +23,7 @@ class TableRecEvaluator(BaseEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
 
@@ -32,7 +32,7 @@ class TableRecEvaluator(BaseEvaluator):
         )
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/text_detection/evaluator.py

@@ -23,14 +23,14 @@ class TextDetEvaluator(BaseEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
 
         self.pdx_config.update_dataset(self.global_config.dataset_dir, "TextDetDataset")
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/text_recognition/evaluator.py

@@ -25,7 +25,7 @@ class TextRecEvaluator(BaseEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
         if self.global_config["model"] == "LaTeX_OCR_rec":
@@ -53,7 +53,7 @@ class TextRecEvaluator(BaseEvaluator):
             self.pdx_config.update_label_dict_path(label_dict_path)
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/ts_anomaly_detection/evaluator.py

@@ -41,7 +41,7 @@ class TSADEvaluator(BaseEvaluator):
         return config_path
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         self.pdx_config.update_dataset(self.global_config.dataset_dir, "TSADDataset")
         self.pdx_config.update_weights(self.eval_config.weight_path)
 
@@ -56,7 +56,7 @@ class TSADEvaluator(BaseEvaluator):
             )
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/ts_classification/evaluator.py

@@ -41,11 +41,11 @@ class TSCLSEvaluator(BaseEvaluator):
         return config_path
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         self.pdx_config.update_dataset(self.global_config.dataset_dir, "TSCLSDataset")
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/ts_forecast/evaluator.py

@@ -41,11 +41,11 @@ class TSFCEvaluator(BaseEvaluator):
         return config_path
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         self.pdx_config.update_dataset(self.global_config.dataset_dir, "TSDataset")
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/video_classification/evaluator.py

@@ -22,7 +22,7 @@ class VideoClsEvaluator(BaseEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
         self.pdx_config.update_dataset(
@@ -33,7 +33,7 @@ class VideoClsEvaluator(BaseEvaluator):
         self.pdx_config.update_pretrained_weights(self.eval_config.weight_path)
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 2 - 2
paddlex/modules/video_detection/evaluator.py

@@ -22,7 +22,7 @@ class VideoDetEvaluator(BaseEvaluator):
     entities = MODELS
 
     def update_config(self):
-        """update evalution config"""
+        """update evaluation config"""
         if self.eval_config.log_interval:
             self.pdx_config.update_log_interval(self.eval_config.log_interval)
         self.pdx_config.update_dataset(
@@ -31,7 +31,7 @@ class VideoDetEvaluator(BaseEvaluator):
         self.pdx_config.update_pretrained_weights(self.eval_config.weight_path)
 
     def get_eval_kwargs(self) -> dict:
-        """get key-value arguments of model evalution function
+        """get key-value arguments of model evaluation function
 
         Returns:
             dict: the arguments of evaluation function.

+ 3 - 3
paddlex/repo_apis/PaddleTS_api/ts_ad/config.py

@@ -24,7 +24,7 @@ class TSAnomalyConfig(BaseTSConfig):
 
     def update_input_len(self, seq_len: int):
         """
-        upadte the input sequence length
+        update the input sequence length
 
         Args:
             seq_len (int): input length
@@ -40,7 +40,7 @@ class TSAnomalyConfig(BaseTSConfig):
 
     def update_dataset(self, dataset_dir: str, dataset_type: str = None):
         """
-        upadte the dataset
+        update the dataset
 
         Args:
             dataset_dir (str): dataset root path
@@ -57,7 +57,7 @@ class TSAnomalyConfig(BaseTSConfig):
         update basic info including time_col, freq, target_cols.
 
         Args:
-            info_params (dict): upadte basic info
+            info_params (dict): update basic info
 
         Raises:
             TypeError: if info_params is not dict, raising TypeError

+ 2 - 2
paddlex/repo_apis/PaddleTS_api/ts_cls/config.py

@@ -24,7 +24,7 @@ class TSClassifyConfig(BaseTSConfig):
 
     def update_dataset(self, dataset_dir: str, dataset_type: str = None):
         """
-        upadte the dataset
+        update the dataset
 
         Args:
             dataset_dir (str): dataset root path
@@ -41,7 +41,7 @@ class TSClassifyConfig(BaseTSConfig):
         update basic info including time_col, freq, target_cols.
 
         Args:
-            info_params (dict): upadte basic info
+            info_params (dict): update basic info
 
         Raises:
             TypeError: if info_params is not dict, raising TypeError

+ 4 - 4
paddlex/repo_apis/PaddleTS_api/ts_fc/config.py

@@ -24,7 +24,7 @@ class LongForecastConfig(BaseTSConfig):
 
     def update_input_len(self, seq_len: int):
         """
-        upadte the input sequence length
+        update the input sequence length
 
         Args:
             seq_len (int): input length
@@ -72,7 +72,7 @@ class LongForecastConfig(BaseTSConfig):
 
     def update_dataset(self, dataset_dir: str, dataset_type: str = None):
         """
-        upadte the dataset
+        update the dataset
 
         Args:
             dataset_dir (str): dataset root path
@@ -89,7 +89,7 @@ class LongForecastConfig(BaseTSConfig):
         update basic info including time_col, freq, target_cols.
 
         Args:
-            info_params (dict): upadte basic info
+            info_params (dict): update basic info
 
         Raises:
             TypeError: if info_params is not dict, raising TypeError
@@ -104,7 +104,7 @@ class LongForecastConfig(BaseTSConfig):
         update patience.
 
         Args:
-            patience (int): upadte patience
+            patience (int): update patience
 
         Raises:
             RuntimeError: if patience is not found, raising RuntimeError