Skip to content

Commit e8a19d3

Browse files
authored
Fix typos (#10483)
1 parent 3a23130 commit e8a19d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+89
-89
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ PaddleNLP 使用 [Git 分支模型](http://nvie.com/posts/a-successful-git-branc
7272
类似于以下内容:
7373

7474
```text
75-
➜ (my-virtual-env) git commit -m "commiting my cool feature"
75+
➜ (my-virtual-env) git commit -m "committing my cool feature"
7676
black....................................................................Passed
7777
isort....................................................................Passed
7878
flake8...................................................................Passed
@@ -91,7 +91,7 @@ PaddleNLP 使用 [Git 分支模型](http://nvie.com/posts/a-successful-git-branc
9191
但大多数时候事情并没有那么顺利。当您的代码或文档不符合标准时,`pre-commit` 检查将失败。
9292

9393
```text
94-
➜ (my-virtual-env) git commit -m "commiting my cool feature"
94+
➜ (my-virtual-env) git commit -m "committing my cool feature"
9595
black....................................................................Passed
9696
isort....................................................................Failed
9797
- hook id: isort

csrc/gpu/moe/fused_moe/cutlass_kernels/moe_gemm/fused_moe_gemm_kernels_template.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ void MoeGemmRunner<T, WeightType>::run_gemm<EpilogueTag>(
725725
gemmConfigManager.addBestConfig(gemmId, profile_total_rows, best_config);
726726
chosen_config = best_config;
727727
} else {
728-
PADDLE_FATAL("[MoE Configure Search] find no one avaliable config.");
728+
PADDLE_FATAL("[MoE Configure Search] find no one available config.");
729729
}
730730
}
731731
dispatch_to_arch<EpilogueTag>(A,

paddlenlp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
logger.warning(
3737
"Detected that datasets module was imported before paddlenlp. "
38-
"This may cause PaddleNLP datasets to be unavalible in intranet. "
38+
"This may cause PaddleNLP datasets to be unavailable in intranet. "
3939
"Please import paddlenlp before datasets module to avoid download issues"
4040
)
4141
import paddle

paddlenlp/dataaug/char.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def _augment_single(self, seq_tokens, aug_indexes):
436436
return sentences
437437

438438
def _generate_sequence(self, output_seq_tokens, aug_tokens, p):
439-
"""Genearte the sequences according to the mapping list"""
439+
"""Generate the sequences according to the mapping list"""
440440
for aug_token in aug_tokens:
441441
idx, token = aug_token
442442
if p == 0:

paddlenlp/dataaug/sentence.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
class SentenceGenerate:
3434
"""
3535
SentenceGenerate is a sentence-level data augmentation strategy
36-
that generates simialr sentences according to the input sequence.
37-
The strattegy first generates several sentences, and then chooses
38-
the top n simialr sentences by the model.
36+
that generates similar sentences according to the input sequence.
37+
The strategy first generates several sentences, and then chooses
38+
the top n similar sentences by the model.
3939
4040
Args:
4141
model_name (str):
@@ -82,7 +82,7 @@ def augment(self, sequences):
8282

8383
@paddle.no_grad()
8484
def _generate_similar_sentence(self, sequence, model, tokenizer):
85-
"""Generates generate_n similar sentences from the provided sequence, and chooose the best create_n similar sentences."""
85+
"""Generates generate_n similar sentences from the provided sequence, and choose the best create_n similar sentences."""
8686

8787
# Generate generate_n similar sentences
8888
generated_sequences = [sequence]
@@ -134,7 +134,7 @@ class SentenceSummarize:
134134
token probabilities in the "sampling" strategy. Default to 1.0,
135135
which means no effect.
136136
use_fp16_decoding: (bool): Whether to use fp16 for decoding.
137-
Only works when faster entry is avalible. Default to False.
137+
Only works when faster entry is available. Default to False.
138138
kwargs (dict): Additional keyword arguments refer to ..taskflow.text_summarization.TextSummarization
139139
"""
140140

@@ -337,8 +337,8 @@ def _translate(self, model, tokenizer, sequences, lang):
337337
class SentenceBackTranslateAPI:
338338
"""
339339
SentenceBackTranslateAPI is a sentence-level data augmentation strategy
340-
that translates the input sequence into one langugage, and backtranslate
341-
back into the sourche language by baidu translate api.
340+
that translates the input sequence into one language, and back-translate
341+
back into the source language by baidu translate api.
342342
343343
Args:
344344
src_lang (str):

paddlenlp/dataaug/word.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def _load_substitute_dict(self, source_type):
170170
return substitute_dict
171171

172172
def _generate_sequence(self, output_seq_tokens, aug_tokens):
173-
"""Genearte the sequences according to the mapping list"""
173+
"""Generate the sequences according to the mapping list"""
174174
for aug_token in aug_tokens:
175175
idx, token = aug_token
176176
output_seq_tokens[int(idx)] = token
@@ -503,7 +503,7 @@ def _augment_single(self, seq_tokens, aug_indexes):
503503
return sentences
504504

505505
def _generate_sequence(self, output_seq_tokens, aug_tokens, p):
506-
"""Genearte the sequences according to the mapping list"""
506+
"""Generate the sequences according to the mapping list"""
507507
for aug_token in aug_tokens:
508508
idx, token = aug_token
509509
if p == 0:

paddlenlp/experimental/autonlp/README_en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Args:
5050
- text_column (string, required): Name of the column that contains the input text.
5151
- label_column (string, required): Name of the column that contains the target variable to predict.
5252
- language (string, required): language of the text
53-
- metric_for_best_model (string, optional): the name of the metrc for selecting the best model.
54-
- greater_is_better (bool, optional): Whether better models should have a greater metric or not. Use in conjuction with `metric_for_best_model`.
53+
- metric_for_best_model (string, optional): the name of the metric for selecting the best model.
54+
- greater_is_better (bool, optional): Whether better models should have a greater metric or not. Use in conjunction with `metric_for_best_model`.
5555
- problem_type (str, optional): Select among ["multi_class", "multi_label"] based on the nature of your problem
5656
- output_dir (str, optional): Output directory for the experiments, defaults to "autpnlp_results"
5757
- verbosity: (int, optional): controls the verbosity of the run. Defaults to 1, which let the workers log to the driver.To reduce the amount of logs, use verbosity > 0 to set stop the workers from logging to the driver.

paddlenlp/experimental/autonlp/auto_trainer_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class AutoTrainerBase(metaclass=ABCMeta):
4545
eval_dataset (Dataset, required): Evaluation dataset, must contains the 'text_column' and 'label_column' specified below
4646
language (string, required): language of the text
4747
metric_for_best_model (string, optional): the name of the metric for selecting the best model.
48-
greater_is_better (bool, required): Whether better models should have a greater metric or not. Use in conjuction with `metric_for_best_model`.
48+
greater_is_better (bool, required): Whether better models should have a greater metric or not. Use in conjunction with `metric_for_best_model`.
4949
output_dir (str, optional): Output directory for the experiments, defaults to "autpnlp_results"
5050
verbosity: (int, optional): controls the verbosity of the run. Defaults to 1, which let the workers log to the driver.To reduce the amount of logs,
5151
use verbosity > 0 to set stop the workers from logging to the driver.

paddlenlp/experimental/autonlp/text_classification.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ class AutoTrainerForTextClassification(AutoTrainerBase):
5959
eval_dataset (Dataset, required): Evaluation dataset, must contains the 'text_column' and 'label_column' specified below
6060
text_column (string, required): Name of the column that contains the input text.
6161
label_column (string, required): Name of the column that contains the target variable to predict.
62-
metric_for_best_model (string, optional): the name of the metrc for selecting the best model. Default to 'eval_accuracy'.
63-
greater_is_better (bool, optional): Whether better models should have a greater metric or not. Use in conjuction with `metric_for_best_model`.
62+
metric_for_best_model (string, optional): the name of the metric for selecting the best model. Default to 'eval_accuracy'.
63+
greater_is_better (bool, optional): Whether better models should have a greater metric or not. Use in conjunction with `metric_for_best_model`.
6464
problem_type (str, optional): Select among ["multi_class", "multi_label"] based on the nature of your problem
6565
kwargs (dict, optional): Additional keyword arguments passed along to the specific task.
6666
language (string, required): language of the text.
@@ -639,7 +639,7 @@ def export(self, export_path: str, trial_id: Optional[str] = None, compress: boo
639639
f"Taskflow config saved to {export_path}. You can use the Taskflow config to create a Taskflow instance for inference"
640640
)
641641

642-
logger.info(f"Exported trial_id: {trial_id} to export_path: {export_path} sucessfully!")
642+
logger.info(f"Exported trial_id: {trial_id} to export_path: {export_path} successfully!")
643643

644644
if os.path.exists(self.training_path):
645645
logger.info("Removing training checkpoints to conserve disk space")

paddlenlp/experimental/faster_tokenizer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
def to_tensor(string_values, name="text"):
3030
"""
3131
Create the tensor that the value holds the list of string.
32-
NOTICE: The value will be holded in the cpu place.
32+
NOTICE: The value will be held in the cpu place.
3333
3434
Args:
35-
string_values(list[string]): The value will be setted to the tensor.
35+
string_values(list[string]): The value will be set to the tensor.
3636
name(string): The name of the tensor.
3737
"""
3838
tensor = paddle.Tensor(core.VarDesc.VarType.STRING, [], name, core.VarDesc.VarType.STRINGS, False)
@@ -43,7 +43,7 @@ def to_tensor(string_values, name="text"):
4343
def to_vocab_buffer(vocab_dict, name):
4444
"""
4545
Create the tensor that the value holds the map, the type of key is the string.
46-
NOTICE: The value will be holded in the cpu place.
46+
NOTICE: The value will be held in the cpu place.
4747
4848
Args:
4949
vocab_dict(dict): The value will be setted to the tensor.

0 commit comments

Comments
 (0)