From d2c81740208c076cc828e67344b1357d856f3014 Mon Sep 17 00:00:00 2001 From: chenxujun Date: Sat, 25 Feb 2023 01:08:51 +0800 Subject: [PATCH] Fix typos (#4994) --- .../ranking/cross_encoder/deploy/python/predict.py | 2 +- .../ranking/ernie_matching/deploy/python/predict.py | 2 +- .../recall/in_batch_negative/deploy/python/predict.py | 2 +- applications/neural_search/recall/milvus/feature_extract.py | 2 +- .../neural_search/recall/simcse/deploy/python/predict.py | 2 +- .../supervised_qa/faq_finance/feature_extract.py | 2 +- .../supervised_qa/faq_system/feature_extract.py | 2 +- .../sentiment_analysis/ASO_analysis/deploy/predict.py | 2 +- .../triton_serving/models/seqcls_postprocess/1/model.py | 2 +- .../deploy/triton_serving/models/tokenizer/1/model.py | 2 +- .../hierarchical/retrieval_based/deploy/python/predict.py | 2 +- .../hierarchical/retrieval_based/utils/feature_extract.py | 2 +- .../triton_serving/models/seqcls_postprocess/1/model.py | 2 +- .../deploy/triton_serving/models/tokenizer/1/model.py | 2 +- .../text_classification/multi_class/retrieval_based/data.py | 2 +- .../multi_class/retrieval_based/deploy/python/predict.py | 2 +- .../multi_class/retrieval_based/evaluate.py | 2 +- .../text_classification/multi_class/retrieval_based/model.py | 2 +- .../text_classification/multi_class/retrieval_based/train.py | 4 ++-- .../multi_class/retrieval_based/utils/feature_extract.py | 2 +- .../triton_serving/models/seqcls_postprocess/1/model.py | 2 +- .../deploy/triton_serving/models/tokenizer/1/model.py | 2 +- .../multi_label/retrieval_based/deploy/python/predict.py | 2 +- .../multi_label/retrieval_based/utils/feature_extract.py | 2 +- .../waybill_ie/deploy/python/predict_bigru_crf.py | 2 +- .../waybill_ie/deploy/python/predict_ernie.py | 2 +- .../waybill_ie/deploy/python/predict_ernie_crf.py | 2 +- .../text_matching/ernie_matching/deploy/python/predict.py | 2 +- model_zoo/ernie-1.0/finetune/deploy/predict_chnsenticorp.py | 2 +- .../deploy/serving/models/ernie_seqcls_postprocess/1/model.py | 2 +- .../deploy/serving/models/ernie_seqcls_tokenizer/1/model.py | 2 +- .../serving/models/ernie_tokencls_postprocess/1/model.py | 2 +- .../deploy/serving/models/ernie_tokencls_tokenizer/1/model.py | 2 +- paddlenlp/data/sampler.py | 2 +- tests/test_tipc/ernie_information_extraction/predict.py | 2 +- tests/test_tipc/ernie_text_cls/predict.py | 2 +- tests/test_tipc/ernie_text_matching/predict.py | 2 +- 37 files changed, 38 insertions(+), 38 deletions(-) diff --git a/applications/neural_search/ranking/cross_encoder/deploy/python/predict.py b/applications/neural_search/ranking/cross_encoder/deploy/python/predict.py index c0cded40def4..50ee6306cfb6 100644 --- a/applications/neural_search/ranking/cross_encoder/deploy/python/predict.py +++ b/applications/neural_search/ranking/cross_encoder/deploy/python/predict.py @@ -117,7 +117,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/neural_search/ranking/ernie_matching/deploy/python/predict.py b/applications/neural_search/ranking/ernie_matching/deploy/python/predict.py index 83930ae8e576..43a2ab65c473 100644 --- a/applications/neural_search/ranking/ernie_matching/deploy/python/predict.py +++ b/applications/neural_search/ranking/ernie_matching/deploy/python/predict.py @@ -116,7 +116,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/neural_search/recall/in_batch_negative/deploy/python/predict.py b/applications/neural_search/recall/in_batch_negative/deploy/python/predict.py index e03b29a793b3..b526fb183004 100644 --- a/applications/neural_search/recall/in_batch_negative/deploy/python/predict.py +++ b/applications/neural_search/recall/in_batch_negative/deploy/python/predict.py @@ -114,7 +114,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/neural_search/recall/milvus/feature_extract.py b/applications/neural_search/recall/milvus/feature_extract.py index ae39c549eec1..b6d429a28f84 100644 --- a/applications/neural_search/recall/milvus/feature_extract.py +++ b/applications/neural_search/recall/milvus/feature_extract.py @@ -81,7 +81,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/neural_search/recall/simcse/deploy/python/predict.py b/applications/neural_search/recall/simcse/deploy/python/predict.py index b2dce237a9c1..04ef08f2411d 100644 --- a/applications/neural_search/recall/simcse/deploy/python/predict.py +++ b/applications/neural_search/recall/simcse/deploy/python/predict.py @@ -116,7 +116,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/question_answering/supervised_qa/faq_finance/feature_extract.py b/applications/question_answering/supervised_qa/faq_finance/feature_extract.py index 25d93b1e92de..3e9a419405f5 100644 --- a/applications/question_answering/supervised_qa/faq_finance/feature_extract.py +++ b/applications/question_answering/supervised_qa/faq_finance/feature_extract.py @@ -95,7 +95,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/question_answering/supervised_qa/faq_system/feature_extract.py b/applications/question_answering/supervised_qa/faq_system/feature_extract.py index 6b13ed217d31..6d2a292c42de 100644 --- a/applications/question_answering/supervised_qa/faq_system/feature_extract.py +++ b/applications/question_answering/supervised_qa/faq_system/feature_extract.py @@ -94,7 +94,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/sentiment_analysis/ASO_analysis/deploy/predict.py b/applications/sentiment_analysis/ASO_analysis/deploy/predict.py index dd17c6aea463..284092e71d99 100644 --- a/applications/sentiment_analysis/ASO_analysis/deploy/predict.py +++ b/applications/sentiment_analysis/ASO_analysis/deploy/predict.py @@ -173,7 +173,7 @@ def create_predictor(self, model_path): if self.args.device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/text_classification/hierarchical/deploy/triton_serving/models/seqcls_postprocess/1/model.py b/applications/text_classification/hierarchical/deploy/triton_serving/models/seqcls_postprocess/1/model.py index 5ec17df4370f..79b67418a03d 100644 --- a/applications/text_classification/hierarchical/deploy/triton_serving/models/seqcls_postprocess/1/model.py +++ b/applications/text_classification/hierarchical/deploy/triton_serving/models/seqcls_postprocess/1/model.py @@ -33,7 +33,7 @@ class TritonPythonModel(object): def initialize(self, args): """`initialize` is called only once when the model is being loaded. Implementing `initialize` function is optional. This function allows - the model to intialize any state associated with this model. + the model to initialize any state associated with this model. Parameters ---------- args : dict diff --git a/applications/text_classification/hierarchical/deploy/triton_serving/models/tokenizer/1/model.py b/applications/text_classification/hierarchical/deploy/triton_serving/models/tokenizer/1/model.py index 1b03c4281e51..d21f37943d7b 100644 --- a/applications/text_classification/hierarchical/deploy/triton_serving/models/tokenizer/1/model.py +++ b/applications/text_classification/hierarchical/deploy/triton_serving/models/tokenizer/1/model.py @@ -35,7 +35,7 @@ class TritonPythonModel(object): def initialize(self, args): """`initialize` is called only once when the model is being loaded. Implementing `initialize` function is optional. This function allows - the model to intialize any state associated with this model. + the model to initialize any state associated with this model. Parameters ---------- args : dict diff --git a/applications/text_classification/hierarchical/retrieval_based/deploy/python/predict.py b/applications/text_classification/hierarchical/retrieval_based/deploy/python/predict.py index 47c8d149551e..fcec12bd5f1f 100644 --- a/applications/text_classification/hierarchical/retrieval_based/deploy/python/predict.py +++ b/applications/text_classification/hierarchical/retrieval_based/deploy/python/predict.py @@ -141,7 +141,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/text_classification/hierarchical/retrieval_based/utils/feature_extract.py b/applications/text_classification/hierarchical/retrieval_based/utils/feature_extract.py index 4441d5f73c10..d2bcfc2cb8fe 100644 --- a/applications/text_classification/hierarchical/retrieval_based/utils/feature_extract.py +++ b/applications/text_classification/hierarchical/retrieval_based/utils/feature_extract.py @@ -110,7 +110,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/text_classification/multi_class/deploy/triton_serving/models/seqcls_postprocess/1/model.py b/applications/text_classification/multi_class/deploy/triton_serving/models/seqcls_postprocess/1/model.py index 97ac4319995f..7226e10b5341 100644 --- a/applications/text_classification/multi_class/deploy/triton_serving/models/seqcls_postprocess/1/model.py +++ b/applications/text_classification/multi_class/deploy/triton_serving/models/seqcls_postprocess/1/model.py @@ -33,7 +33,7 @@ class TritonPythonModel(object): def initialize(self, args): """`initialize` is called only once when the model is being loaded. Implementing `initialize` function is optional. This function allows - the model to intialize any state associated with this model. + the model to initialize any state associated with this model. Parameters ---------- args : dict diff --git a/applications/text_classification/multi_class/deploy/triton_serving/models/tokenizer/1/model.py b/applications/text_classification/multi_class/deploy/triton_serving/models/tokenizer/1/model.py index d95c175d0cb0..eb1c1541ec67 100644 --- a/applications/text_classification/multi_class/deploy/triton_serving/models/tokenizer/1/model.py +++ b/applications/text_classification/multi_class/deploy/triton_serving/models/tokenizer/1/model.py @@ -35,7 +35,7 @@ class TritonPythonModel(object): def initialize(self, args): """`initialize` is called only once when the model is being loaded. Implementing `initialize` function is optional. This function allows - the model to intialize any state associated with this model. + the model to initialize any state associated with this model. Parameters ---------- args : dict diff --git a/applications/text_classification/multi_class/retrieval_based/data.py b/applications/text_classification/multi_class/retrieval_based/data.py index d47b1d965301..17081543edaa 100644 --- a/applications/text_classification/multi_class/retrieval_based/data.py +++ b/applications/text_classification/multi_class/retrieval_based/data.py @@ -189,7 +189,7 @@ def get_latest_ann_data(ann_data_dir): def valid_checkpoint(step): ann_data_file = os.path.join(ann_data_dir, step, "new_ann_data") - # succed_flag_file is an empty file that indicates ann data has been generated + # succeed_flag_file is an empty file that indicates ann data has been generated succeed_flag_file = os.path.join(ann_data_dir, step, "succeed_flag_file") return os.path.exists(succeed_flag_file) and os.path.exists(ann_data_file) diff --git a/applications/text_classification/multi_class/retrieval_based/deploy/python/predict.py b/applications/text_classification/multi_class/retrieval_based/deploy/python/predict.py index 5187e460ad81..d9bfd24500ba 100644 --- a/applications/text_classification/multi_class/retrieval_based/deploy/python/predict.py +++ b/applications/text_classification/multi_class/retrieval_based/deploy/python/predict.py @@ -141,7 +141,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/text_classification/multi_class/retrieval_based/evaluate.py b/applications/text_classification/multi_class/retrieval_based/evaluate.py index 191e0e7abbee..51794dba42a4 100644 --- a/applications/text_classification/multi_class/retrieval_based/evaluate.py +++ b/applications/text_classification/multi_class/retrieval_based/evaluate.py @@ -27,7 +27,7 @@ parser.add_argument("--recall_result_file", type=str, default='', help="The full path of recall result file") parser.add_argument("--recall_num", type=int, default=10, - help="Most similair number of doc recalled from corpus per query") + help="Most similar number of doc recalled from corpus per query") args = parser.parse_args() diff --git a/applications/text_classification/multi_class/retrieval_based/model.py b/applications/text_classification/multi_class/retrieval_based/model.py index c181bd8fc79b..97ab46d9e2f7 100644 --- a/applications/text_classification/multi_class/retrieval_based/model.py +++ b/applications/text_classification/multi_class/retrieval_based/model.py @@ -52,7 +52,7 @@ def forward( cosine_sim = paddle.matmul(query_cls_embedding, title_cls_embedding, transpose_y=True) - # substract margin from all positive samples cosine_sim() + # subtract margin from all positive samples cosine_sim() margin_diag = paddle.full( shape=[query_cls_embedding.shape[0]], fill_value=self.margin, dtype=paddle.get_default_dtype() ) diff --git a/applications/text_classification/multi_class/retrieval_based/train.py b/applications/text_classification/multi_class/retrieval_based/train.py index d8123ce09f76..9aa1da4bc15c 100644 --- a/applications/text_classification/multi_class/retrieval_based/train.py +++ b/applications/text_classification/multi_class/retrieval_based/train.py @@ -65,9 +65,9 @@ parser.add_argument('--device', choices=['cpu', 'gpu'], default="cpu", help="Select which device to train model, defaults to gpu.") parser.add_argument('--save_steps', type=int, default=10000, - help="Inteval steps to save checkpoint") + help="Interval steps to save checkpoint") parser.add_argument('--log_steps', type=int, default=10, - help="Inteval steps to print log") + help="Interval steps to print log") parser.add_argument("--train_set_file", type=str, default='./data/train.txt', help="The full path of train_set_file.") diff --git a/applications/text_classification/multi_class/retrieval_based/utils/feature_extract.py b/applications/text_classification/multi_class/retrieval_based/utils/feature_extract.py index ada9e10f1831..c5d21fbef3c9 100644 --- a/applications/text_classification/multi_class/retrieval_based/utils/feature_extract.py +++ b/applications/text_classification/multi_class/retrieval_based/utils/feature_extract.py @@ -110,7 +110,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/text_classification/multi_label/deploy/triton_serving/models/seqcls_postprocess/1/model.py b/applications/text_classification/multi_label/deploy/triton_serving/models/seqcls_postprocess/1/model.py index 5ec17df4370f..79b67418a03d 100644 --- a/applications/text_classification/multi_label/deploy/triton_serving/models/seqcls_postprocess/1/model.py +++ b/applications/text_classification/multi_label/deploy/triton_serving/models/seqcls_postprocess/1/model.py @@ -33,7 +33,7 @@ class TritonPythonModel(object): def initialize(self, args): """`initialize` is called only once when the model is being loaded. Implementing `initialize` function is optional. This function allows - the model to intialize any state associated with this model. + the model to initialize any state associated with this model. Parameters ---------- args : dict diff --git a/applications/text_classification/multi_label/deploy/triton_serving/models/tokenizer/1/model.py b/applications/text_classification/multi_label/deploy/triton_serving/models/tokenizer/1/model.py index d95c175d0cb0..eb1c1541ec67 100644 --- a/applications/text_classification/multi_label/deploy/triton_serving/models/tokenizer/1/model.py +++ b/applications/text_classification/multi_label/deploy/triton_serving/models/tokenizer/1/model.py @@ -35,7 +35,7 @@ class TritonPythonModel(object): def initialize(self, args): """`initialize` is called only once when the model is being loaded. Implementing `initialize` function is optional. This function allows - the model to intialize any state associated with this model. + the model to initialize any state associated with this model. Parameters ---------- args : dict diff --git a/applications/text_classification/multi_label/retrieval_based/deploy/python/predict.py b/applications/text_classification/multi_label/retrieval_based/deploy/python/predict.py index b8370c8aceba..44d550356b39 100644 --- a/applications/text_classification/multi_label/retrieval_based/deploy/python/predict.py +++ b/applications/text_classification/multi_label/retrieval_based/deploy/python/predict.py @@ -141,7 +141,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/applications/text_classification/multi_label/retrieval_based/utils/feature_extract.py b/applications/text_classification/multi_label/retrieval_based/utils/feature_extract.py index 1c2a20bafd7a..bb9e6d81d561 100644 --- a/applications/text_classification/multi_label/retrieval_based/utils/feature_extract.py +++ b/applications/text_classification/multi_label/retrieval_based/utils/feature_extract.py @@ -111,7 +111,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/examples/information_extraction/waybill_ie/deploy/python/predict_bigru_crf.py b/examples/information_extraction/waybill_ie/deploy/python/predict_bigru_crf.py index 4622b5e2c70c..2c8cf4332f7f 100644 --- a/examples/information_extraction/waybill_ie/deploy/python/predict_bigru_crf.py +++ b/examples/information_extraction/waybill_ie/deploy/python/predict_bigru_crf.py @@ -158,7 +158,7 @@ def __init__( config = paddle.inference.Config(model_file, param_file) if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/examples/information_extraction/waybill_ie/deploy/python/predict_ernie.py b/examples/information_extraction/waybill_ie/deploy/python/predict_ernie.py index 8abc42120118..16376adc7954 100644 --- a/examples/information_extraction/waybill_ie/deploy/python/predict_ernie.py +++ b/examples/information_extraction/waybill_ie/deploy/python/predict_ernie.py @@ -149,7 +149,7 @@ def __init__( config = paddle.inference.Config(model_file, param_file) if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/examples/information_extraction/waybill_ie/deploy/python/predict_ernie_crf.py b/examples/information_extraction/waybill_ie/deploy/python/predict_ernie_crf.py index 96d9a58414ae..045b0bf3a470 100644 --- a/examples/information_extraction/waybill_ie/deploy/python/predict_ernie_crf.py +++ b/examples/information_extraction/waybill_ie/deploy/python/predict_ernie_crf.py @@ -149,7 +149,7 @@ def __init__( config = paddle.inference.Config(model_file, param_file) if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/examples/text_matching/ernie_matching/deploy/python/predict.py b/examples/text_matching/ernie_matching/deploy/python/predict.py index a95a46691e5d..3081fb361709 100644 --- a/examples/text_matching/ernie_matching/deploy/python/predict.py +++ b/examples/text_matching/ernie_matching/deploy/python/predict.py @@ -97,7 +97,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/model_zoo/ernie-1.0/finetune/deploy/predict_chnsenticorp.py b/model_zoo/ernie-1.0/finetune/deploy/predict_chnsenticorp.py index 0e64acb26d1f..a34a11338bdc 100644 --- a/model_zoo/ernie-1.0/finetune/deploy/predict_chnsenticorp.py +++ b/model_zoo/ernie-1.0/finetune/deploy/predict_chnsenticorp.py @@ -72,7 +72,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/model_zoo/ernie-3.0/deploy/serving/models/ernie_seqcls_postprocess/1/model.py b/model_zoo/ernie-3.0/deploy/serving/models/ernie_seqcls_postprocess/1/model.py index cfbba6de5b44..d4f72200eb24 100644 --- a/model_zoo/ernie-3.0/deploy/serving/models/ernie_seqcls_postprocess/1/model.py +++ b/model_zoo/ernie-3.0/deploy/serving/models/ernie_seqcls_postprocess/1/model.py @@ -31,7 +31,7 @@ class TritonPythonModel: def initialize(self, args): """`initialize` is called only once when the model is being loaded. Implementing `initialize` function is optional. This function allows - the model to intialize any state associated with this model. + the model to initialize any state associated with this model. Parameters ---------- args : dict diff --git a/model_zoo/ernie-3.0/deploy/serving/models/ernie_seqcls_tokenizer/1/model.py b/model_zoo/ernie-3.0/deploy/serving/models/ernie_seqcls_tokenizer/1/model.py index ba956171ff37..6e0ab6315765 100644 --- a/model_zoo/ernie-3.0/deploy/serving/models/ernie_seqcls_tokenizer/1/model.py +++ b/model_zoo/ernie-3.0/deploy/serving/models/ernie_seqcls_tokenizer/1/model.py @@ -33,7 +33,7 @@ class TritonPythonModel: def initialize(self, args): """`initialize` is called only once when the model is being loaded. Implementing `initialize` function is optional. This function allows - the model to intialize any state associated with this model. + the model to initialize any state associated with this model. Parameters ---------- args : dict diff --git a/model_zoo/ernie-3.0/deploy/serving/models/ernie_tokencls_postprocess/1/model.py b/model_zoo/ernie-3.0/deploy/serving/models/ernie_tokencls_postprocess/1/model.py index b139fd69efb9..2e1e6720a17c 100644 --- a/model_zoo/ernie-3.0/deploy/serving/models/ernie_tokencls_postprocess/1/model.py +++ b/model_zoo/ernie-3.0/deploy/serving/models/ernie_tokencls_postprocess/1/model.py @@ -31,7 +31,7 @@ class TritonPythonModel: def initialize(self, args): """`initialize` is called only once when the model is being loaded. Implementing `initialize` function is optional. This function allows - the model to intialize any state associated with this model. + the model to initialize any state associated with this model. Parameters ---------- args : dict diff --git a/model_zoo/ernie-3.0/deploy/serving/models/ernie_tokencls_tokenizer/1/model.py b/model_zoo/ernie-3.0/deploy/serving/models/ernie_tokencls_tokenizer/1/model.py index b289cfbc86da..66c3a947371d 100644 --- a/model_zoo/ernie-3.0/deploy/serving/models/ernie_tokencls_tokenizer/1/model.py +++ b/model_zoo/ernie-3.0/deploy/serving/models/ernie_tokencls_tokenizer/1/model.py @@ -33,7 +33,7 @@ class TritonPythonModel: def initialize(self, args): """`initialize` is called only once when the model is being loaded. Implementing `initialize` function is optional. This function allows - the model to intialize any state associated with this model. + the model to initialize any state associated with this model. Parameters ---------- args : dict diff --git a/paddlenlp/data/sampler.py b/paddlenlp/data/sampler.py index 5a13681f8e66..7c7ec5c72c34 100644 --- a/paddlenlp/data/sampler.py +++ b/paddlenlp/data/sampler.py @@ -345,7 +345,7 @@ def shard(self, num_replicas=None, rank=None): Default: None. rank (int, optional): The id of current training process. Equal to the value of the environment variable PADDLE_TRAINER_ID. If - None, it will be intialized by :meth:`paddle.distributed.get_rank` + None, it will be initialized by :meth:`paddle.distributed.get_rank` method. Default: None. Returns: diff --git a/tests/test_tipc/ernie_information_extraction/predict.py b/tests/test_tipc/ernie_information_extraction/predict.py index 275017aad12e..8bd970cb9ac1 100644 --- a/tests/test_tipc/ernie_information_extraction/predict.py +++ b/tests/test_tipc/ernie_information_extraction/predict.py @@ -138,7 +138,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/tests/test_tipc/ernie_text_cls/predict.py b/tests/test_tipc/ernie_text_cls/predict.py index 3f8492eb837b..dd220b85938b 100644 --- a/tests/test_tipc/ernie_text_cls/predict.py +++ b/tests/test_tipc/ernie_text_cls/predict.py @@ -105,7 +105,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half, diff --git a/tests/test_tipc/ernie_text_matching/predict.py b/tests/test_tipc/ernie_text_matching/predict.py index 5107cb3b5295..582764679226 100644 --- a/tests/test_tipc/ernie_text_matching/predict.py +++ b/tests/test_tipc/ernie_text_matching/predict.py @@ -69,7 +69,7 @@ def __init__( if device == "gpu": # set GPU configs accordingly - # such as intialize the gpu memory, enable tensorrt + # such as initialize the gpu memory, enable tensorrt config.enable_use_gpu(100, 0) precision_map = { "fp16": inference.PrecisionType.Half,