Skip to content

Commit 02a687c

Browse files
authored
[CodeStyle][Typos][S-19] Fix typo (setted,ser) (#71077)
1 parent 82361ca commit 02a687c

File tree

13 files changed

+19
-22
lines changed

13 files changed

+19
-22
lines changed

_typos.toml

-3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,3 @@ UNEXPECT = 'UNEXPECT'
5151
tood = 'tood'
5252
unpacket = "unpacket"
5353
vaccum = 'vaccum'
54-
55-
# These words need to be fixed
56-
setted = 'setted'

paddle/fluid/framework/op_desc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class TEST_API OpDesc {
237237
// runtime_attrs_ contains the attributes which used for dispatching kernel
238238
// (use_mkldnn, use_cudnn, ...) or passing additional configuration for
239239
// special heterogeneous kernel (workspace_size_MB, ...).
240-
// The attributes in runtime_attrs_ are setted by framework (such as PASS),
240+
// The attributes in runtime_attrs_ are set by framework (such as PASS),
241241
// and not in the python api.
242242
AttributeMap runtime_attrs_;
243243

paddle/fluid/framework/operator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ class TEST_API OperatorBase {
400400
// NOTE: runtime_attrs_ contains the attributes which used for dispatching
401401
// kernel (use_mkldnn, use_cudnn, ...) or passing additional configuration
402402
// for special heterogeneous kernel (workspace_size_MB, ...).
403-
// The attributes in runtime_attrs_ are setted by framework (such as PASS),
403+
// The attributes in runtime_attrs_ are set by framework (such as PASS),
404404
// and not in the python api.
405405
AttributeMap runtime_attrs_;
406406

paddle/fluid/inference/tensorrt/convert/emb_eltwise_layernorm.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class EmbEltwiseLayerNormOpConverter : public OpConverter {
9494
common::errors::InvalidArgument(
9595
"Only Precision::KHalf(fp16) is supported when inferring "
9696
"ernie(bert) model with config.EnableVarseqlen(). "
97-
"But Precision::KFloat32 is setted."));
97+
"But Precision::KFloat32 is set."));
9898

9999
std::vector<nvinfer1::PluginField> fields;
100100
std::vector<std::string> temp_fields_keys;

paddle/fluid/inference/tensorrt/convert/preln_emb_eltwise_layernorm.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class PrelnEmbEltwiseLayerNormOpConverter : public OpConverter {
147147
common::errors::InvalidArgument(
148148
"Only Precision::KHalf(fp16) is supported when inferring "
149149
"ernie(bert) model with config.EnableVarseqlen(). "
150-
"But Precision::KFloat32 is setted."));
150+
"But Precision::KFloat32 is set."));
151151

152152
std::vector<nvinfer1::PluginField> fields;
153153
std::vector<std::string> temp_fields_keys;

paddle/fluid/inference/tensorrt/convert/prompt_tuning_emb_eltwise_layernorm.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class PromptTuningEmbEltwiseLayerNormOpConverter : public OpConverter {
9393
common::errors::InvalidArgument(
9494
"Only Precision::KHalf(fp16) is supported when inferring "
9595
"ernie(bert) model with config.EnableVarseqlen(). "
96-
"But Precision::KFloat32 is setted."));
96+
"But Precision::KFloat32 is set."));
9797

9898
std::vector<nvinfer1::PluginField> fields;
9999
std::vector<std::string> temp_fields_keys;

paddle/fluid/operators/fill_constant_op.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class FillConstantOp : public framework::OperatorWithKernel {
7878
// TODO(zyfncg) The force_cpu and place_type are conflicted, it's an issue
7979
// left before, and we may merge them in the future.
8080
// In order to invoke new fill_constant kernel, the place of OpKernelType
81-
// will be setted by force_cpu and place_type here.
81+
// will be set by force_cpu and place_type here.
8282
if (ctx.Attr<bool>("force_cpu")) {
8383
kt.set_backend(phi::Backend::CPU);
8484
}

paddle/phi/api/lib/api_gen_utils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ CreateKernelDistOutput(std::vector<Tensor*> out,
181181
std::shared_ptr<phi::distributed::DistTensor> CreateKernelDistOutput(
182182
Tensor* out, const phi::distributed::ArgDistAttr& dist_attr);
183183

184-
// DistTensor need to set initial dist attr after the dims setted, it is
184+
// DistTensor need to set initial dist attr after the dims set, it is
185185
// constructed based dims and current process mesh, before calling this
186186
// function, the out should hold correct dims
187187
void SetReplicatedDistAttrForOutput(

paddle/phi/api/lib/data_transform.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ class TransformFlag {
5858

5959
private:
6060
// This is the highest priority in flags,
61-
// and can be setted by api[data_transform->skip_transform] in the yaml file.
61+
// and can be set by api[data_transform->skip_transform] in the yaml file.
6262
bool stop_transform_ = false;
6363

64-
// trans_data_type_ can be setted by api[data_transform->support_trans_dtype]
64+
// trans_data_type_ can be set by api[data_transform->support_trans_dtype]
6565
// in the yaml file.
6666
// trans_data_type_ only affect the non complex types,
6767
// the complex is always transferred, except stop_transform_ is true.
6868
bool trans_data_type_ = false;
6969

7070
// trans_backend_ and trans_layout_ are true default,
71-
// and they can only be setted by global flag.
71+
// and they can only be set by global flag.
7272
bool trans_backend_ = true;
7373
bool trans_layout_ = true;
7474
};

python/paddle/base/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def to_list(s):
389389

390390
def set_paddle_custom_device_lib_path(lib_path):
391391
if os.environ.get('CUSTOM_DEVICE_ROOT', None) is not None:
392-
# use setted environment value
392+
# use set environment value
393393
return
394394
if os.path.exists(lib_path):
395395
# set CUSTOM_DEVICE_ROOT default path

python/paddle/nn/layer/container.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def append(self, parameter: Tensor) -> Self:
514514
class LayerList(Layer):
515515
"""
516516
LayerList holds sublayers, and sublayers it contains are properly registered.
517-
Holded sublayers can be indexed like a regular python list.
517+
held sublayers can be indexed like a regular python list.
518518
519519
Parameters:
520520
sublayers (iterable of Layer, optional): sublayers to hold

test/deprecated/tokenizer/test_faster_tokenizer_op_deprecated.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
def to_string_tensor(string_values, name):
3333
"""
3434
Create the tensor that the value holds the list of string.
35-
NOTICE: The value will be holded in the cpu place.
35+
NOTICE: The value will be held in the cpu place.
3636
3737
Args:
38-
string_values(list[string]): The value will be setted to the tensor.
38+
string_values(list[string]): The value will be set to the tensor.
3939
name(string): The name of the tensor.
4040
"""
4141
tensor = paddle.Tensor(
@@ -53,10 +53,10 @@ def to_map_tensor(string_dict, name):
5353
"""
5454
Create the tensor that the value holds the map, the type of key is the string
5555
and the value is the int.
56-
NOTICE: The value will be holded in the cpu place.
56+
NOTICE: The value will be held in the cpu place.
5757
5858
Args:
59-
string_dict(dict): The value will be setted to the tensor.
59+
string_dict(dict): The value will be set to the tensor.
6060
name(string): The name of the tensor.
6161
"""
6262
tensor = paddle.Tensor(

tools/document_preview.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ nbsphinx
137137
BCECMD_CONFIG=/opt/linux-bcecmd-0.3.0/boscmdconfig
138138

139139
is_shell_attribute_set x
140-
xdebug_setted=$?
141-
if [ $xdebug_setted ] ; then
140+
xdebug_set=$?
141+
if [ $xdebug_set ] ; then
142142
set +x
143143
fi
144144
if [ -n "${BOS_CREDENTIAL_AK}" ] && [ -n "${BOS_CREDENTIAL_SK}" ] ; then
145145
echo "Ak = ${BOS_CREDENTIAL_AK}" >> ${BCECMD_CONFIG}/credentials
146146
echo "Sk = ${BOS_CREDENTIAL_SK}" >> ${BCECMD_CONFIG}/credentials
147147
fi
148-
if [ $xdebug_setted ] ; then
148+
if [ $xdebug_set ] ; then
149149
set -x
150150
fi
151151

0 commit comments

Comments
 (0)