Skip to content

Commit c1bccf2

Browse files
authored
[CodeStyle][Typos][P-[1-10],P-[13-15]] Fix typo("Prallel", "Paremeter", "Pipline", "Porgram", "Propogation", "Protocal", "Pyhton", "parammeters", "palce", "poniter", "promot", "propegation", "provicded") (#7582)
* [Fix] typo P[1-10], P[13-15] * [Fix] fix omitted typo in P-8 and remove corresponding lines in _typos.toml
1 parent d9b8a55 commit c1bccf2

File tree

14 files changed

+23
-37
lines changed

14 files changed

+23
-37
lines changed

_typos.toml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@ Moible = "Moible"
3737
Operaton = "Operaton"
3838
Optimizaing = "Optimizaing"
3939
Optimzier = "Optimzier"
40-
Paremeter = "Paremeter"
41-
Pipline = "Pipline"
42-
Porgram = "Porgram"
43-
Prallel = "Prallel"
44-
Propegation = "Propegation"
45-
Propogation = "Propogation"
46-
Protocal = "Protocal"
47-
Pyhton = "Pyhton"
4840
REGISTE = "REGISTE"
4941
Reivew = "Reivew"
5042
Reuqest = "Reuqest"
@@ -141,14 +133,8 @@ outpu = "outpu"
141133
outpus = "outpus"
142134
overrided = "overrided"
143135
overwrited = "overwrited"
144-
palce = "palce"
145-
parammeters = "parammeters"
146-
poniter = "poniter"
147136
porcess = "porcess"
148137
processer = "processer"
149-
promot = "promot"
150-
propegation = "propegation"
151-
provicded = "provicded"
152138
recevied = "recevied"
153139
recomment = "recomment"
154140
registerd = "registerd"

ci_scripts/check_api_parameters.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def _check_params_in_description(rstfilename, paramstr):
107107
)
108108
else:
109109
info = f"The number of params in title does not match the params in description: {len(params_in_title)} != {len(items)}."
110-
print(f"check failed (parammeters description): {rstfilename}")
110+
print(f"check failed (parameters description): {rstfilename}")
111111
else:
112112
for i in range(len(items)):
113113
pname_in_title = params_in_title[i].split("=")[0].strip()
@@ -120,13 +120,13 @@ def _check_params_in_description(rstfilename, paramstr):
120120
flag = False
121121
info = f"the following param in title does not match the param in description: {pname_in_title} != {pname_indesc}."
122122
print(
123-
f"check failed (parammeters description): {rstfilename}, {pname_in_title} != {pname_indesc}"
123+
f"check failed (parameters description): {rstfilename}, {pname_in_title} != {pname_indesc}"
124124
)
125125
else:
126126
flag = False
127127
info = f"param name '{pname_in_title}' not matched in description line{i + 1}, check it please."
128128
print(
129-
f"check failed (parammeters description): {rstfilename}, param name not found in {i} paragraph."
129+
f"check failed (parameters description): {rstfilename}, param name not found in {i} paragraph."
130130
)
131131
else:
132132
if params_in_title:
@@ -148,8 +148,8 @@ def _check_params_in_description_with_fullargspec(rstfilename, funcname):
148148
params_inspec = funcspec.args
149149
if len(items) != len(params_inspec):
150150
flag = False
151-
info = f"check_with_fullargspec failed (parammeters description): {rstfilename}"
152-
print(f"check failed (parammeters description): {rstfilename}")
151+
info = f"check_with_fullargspec failed (parameters description): {rstfilename}"
152+
print(f"check failed (parameters description): {rstfilename}")
153153
else:
154154
for i in range(len(items)):
155155
pname_in_title = params_inspec[i]
@@ -162,13 +162,13 @@ def _check_params_in_description_with_fullargspec(rstfilename, funcname):
162162
flag = False
163163
info = f"the following param in title does not match the param in description: {pname_in_title} != {pname_indesc}."
164164
print(
165-
f"check failed (parammeters description): {rstfilename}, {pname_in_title} != {pname_indesc}"
165+
f"check failed (parameters description): {rstfilename}, {pname_in_title} != {pname_indesc}"
166166
)
167167
else:
168168
flag = False
169169
info = f"param name '{pname_in_title}' not matched in description line{i + 1}, check it please."
170170
print(
171-
f"check failed (parammeters description): {rstfilename}, param name not found in {i} paragraph."
171+
f"check failed (parameters description): {rstfilename}, param name not found in {i} paragraph."
172172
)
173173
else:
174174
if funcspec.args:

docs/api/paddle/jit/TranslatedLayer_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ program(method_name='forward'):
2424

2525
**参数**
2626

27-
- **method_name** (string) - 要获取的 Porgram 对应的方法名。默认值为"forward"。
27+
- **method_name** (string) - 要获取的 Program 对应的方法名。默认值为"forward"。
2828

2929
**返回**
3030
Program

docs/design/concurrent/go_op.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The go operator can be accessed by using the fluid.Go() control flow. This
2727
will create a new sub block, where the user can add additional operators
2828
to be ran on the thread.
2929

30-
**Note:** Since back propegation is currently not support in the go_op, users
30+
**Note:** Since back propagation is currently not support in the go_op, users
3131
should ensure that operators in the go block does not require gradient
3232
calculations.
3333

@@ -225,7 +225,7 @@ when spawning these threads. For the first version of CSP, we only support
225225
OS threads.
226226

227227

228-
#### Backward Propegation:
228+
#### Backward Propagation:
229229

230230
go_op currently does not support backwards propagation. Please use go_op with
231231
non training operators.

docs/design/modules/net_op_design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class PlainNet : public Net {
9595
virtual Error InferShape(Scope *scope) override;
9696

9797
// Run all the operators with the `scope`, if no scope is provided, default
98-
// scope will be used instead. If no OpContext is provicded, default context will be used.
98+
// scope will be used instead. If no OpContext is provided, default context will be used.
9999
virtual Error Run(Scope *scope = nullptr, OpContext *context=nullptr, OpIndex begin = -1,
100100
OpIndex end = -1) const override;
101101

docs/design/others/graph_survey.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get_symbol(num_classes=10, **kwargs):
3030

3131
Variable here is actually a Symbol. Every basic Symbol will correspond to one Node, and every Node has its own AnyAttr. There is a op field in AnyAttr class, when a Symbol represents Variable(often input data), the op field is null.
3232

33-
Symbol contains a data member, std::vector<NodeEntry> outputs, and NodeEntry cantains a poniter to Node. We can follow the Node pointer to get all the Graph.
33+
Symbol contains a data member, std::vector<NodeEntry> outputs, and NodeEntry cantains a pointer to Node. We can follow the Node pointer to get all the Graph.
3434

3535
And Symbol can be saved to a JSON file.
3636

docs/design/phi/design_en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ For the management of the new form of Kernel, the current design is as follows:
867867
Described as follows:
868868
869869
- `KernelFactory` is a global singleton data structure for managing Kernel. Similar to `OpKernelMap` of fluid, it is a two-level map. The first-level mapping finds the Kernel set according to the name, and the second-level mapping finds the specific Kernel according to the KernelKey.
870-
- `KernelKey` is similar to the original `OpKernelType`, but the `palce` and `library_type` fields are combined into one and called `Backend`, because the original `LibraryType` is a limited enumeration class, which is strongly related to place, the splitting increases the cost of understanding instead.
870+
- `KernelKey` is similar to the original `OpKernelType`, but the `place` and `library_type` fields are combined into one and called `Backend`, because the original `LibraryType` is a limited enumeration class, which is strongly related to place, the splitting increases the cost of understanding instead.
871871
- `Kernel` holds more information than the original `OpKernel`. In addition to the Function during execution, it also holds information about specific parameters, namely `KernelArgsDef`. For Tensor type input and output, it saves Tensor type information, Device, data Type, data layout. For Attribute type input and output, it saves type information.
872872
873873

docs/dev_guides/api_contributing_guides/auto_parallel_op_cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ SpmdInfo ElementwiseBinaryInferSpmd(const DistMetaTensor& x,
107107
std::string x_axes, y_axes, out_axes;
108108
GetBinaryNotations(x_shape, y_shape, &x_axes, &y_axes, &out_axes);
109109
110-
// Step2: Sharding Propogation
110+
// Step2: Sharding Propagation
111111
// Step2.1: 合并输入的 dims mapping,得到每一维度对应的 dims mapping 值。
112112
// 调用 ShardingMergeForTensors 可以对输入 dims mapping 进行合并,返回的 map 即为
113113
// 每一维度对应的 dims mapping 值。

docs/dev_guides/custom_device_docs/event_api_en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ C_Status (*create_event)(const C_Device device, C_Event* event)
1212
1313
It creates an event, which is used to synchronize tasks of different streams within the framework. When the device does not support asynchronous execution, empty implementation of the API is required.
1414
15-
### Paremeter
15+
### Parameter
1616
1717
device - the device to be used
1818

docs/dev_guides/style_guide_and_references/type_annotations_specification_cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def filter_user(user: list[User], type: UserType) -> list[User]: ...
256256
257257
### 参数应尽可能使用抽象类型,返回值应尽可能使用具体类型
258258

259-
对于函数输入参数,如果允许,我们应该尽可能使用 [Protocal](https://docs.python.org/3/library/typing.html#typing.Protocol),如 [Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)[Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping)[Iterable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable) 等抽象类型,以提高函数的通用性。而对于函数返回值,我们应该尽可能使用具体类型,以确保下游使用时能得到更好的提示效果。
259+
对于函数输入参数,如果允许,我们应该尽可能使用 [Protocol](https://docs.python.org/3/library/typing.html#typing.Protocol),如 [Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)[Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping)[Iterable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable) 等抽象类型,以提高函数的通用性。而对于函数返回值,我们应该尽可能使用具体类型,以确保下游使用时能得到更好的提示效果。
260260

261261
比如相比于如下写法:
262262

0 commit comments

Comments
 (0)