Skip to content

Commit 311562e

Browse files
authored
[CodeStyle][Typos][S-20,S-22,S-[24-29]] Fix typo(skiped,'specail','splited','stradegy','stirng','subract','sucess','sucessor','sucessors') (#7647)
1 parent 1f43849 commit 311562e

File tree

8 files changed

+15
-24
lines changed

8 files changed

+15
-24
lines changed

_typos.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,7 @@ setted = "setted"
3636
shoule = "shoule"
3737
similary = "similary"
3838
simplier = "simplier"
39-
skiped = "skiped"
4039
softwares = "softwares"
41-
specail = "specail"
4240
sperated = "sperated"
43-
splited = "splited"
4441
splitted = "splitted"
45-
stirng = "stirng"
46-
stradegy = "stradegy"
47-
subract = "subract"
48-
sucess = "sucess"
49-
sucessor = "sucessor"
50-
sucessors = "sucessors"
5142
szie = "szie"

ci_scripts/check_api_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def check_api_parameters(rstfiles, apiinfo):
184184
"""check function's parameters same as its origin definition.
185185
186186
TODO:
187-
1. All the documents of classes are skiped now. As
187+
1. All the documents of classes are skipped now. As
188188
(1) there ars many class methods in documents, may break the scripts.
189189
(2) parameters of Class should be checked with its `__init__` method.
190190
2. Some COMPLICATED annotations may break the scripts.

docs/api/gen_doc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ def parse_module_file(mod):
262262
return
263263
logger.debug("parsing %s:%s", mod_name, src_file)
264264
if len(mod_name) >= 6 and mod_name[:6] == "paddle":
265-
fn_splited = os.path.splitext(src_file)
266-
if len(fn_splited) > 1 and fn_splited[1].lower() == ".py":
265+
fn_split = os.path.splitext(src_file)
266+
if len(fn_split) > 1 and fn_split[1].lower() == ".py":
267267
mod_ast = ast.parse(open(src_file, "r").read())
268268
for node in mod_ast.body:
269269
short_names = []

docs/design/memory/memory_optimization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
## Problem
55

6-
In a lecture from Andrew Ng, he attributes the recent sucess of AI due to a combination of these:
6+
In a lecture from Andrew Ng, he attributes the recent success of AI due to a combination of these:
77

88
- Availability of Big Data
99
- Supercomputing power to process this Big Data over very large neural networks
@@ -74,7 +74,7 @@ A simple way to perform data-flow analysis of programs is to set up dataflow equ
7474

7575
- Flow Graph Terminology
7676

77-
A flow graph node has out-edges that lead to sucessor nodes, and in-edges that come from predecessor nodes. The set *pred[n]* is all the predecessors of node n, and *succ[n]* is the set of sucessors.
77+
A flow graph node has out-edges that lead to successor nodes, and in-edges that come from predecessor nodes. The set *pred[n]* is all the predecessors of node n, and *succ[n]* is the set of successors.
7878
In former control flow graph, the out-edges of node 5 are 5 --> 6 and 5 --> 2, and *succ[5]* = {2, 6}. The in-edges of 2 are 5 --> 2 and 1 --> 2, and *pred[2]* = {1, 5}.
7979

8080
- Uses and Defs
@@ -147,7 +147,7 @@ We can transfer all the operators and variables in ProgramDesc to build a contro
147147
```python
148148
class ControlFlowGraph:
149149
def __init__(self, Program):
150-
self._sucessors = defaultdict(set)
150+
self._successors = defaultdict(set)
151151
self._presucessors = defaultdict(set)
152152
self._uses = defaultdict(set)
153153
self._defs = defaultdict(set)

docs/design/modules/python_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class Operator:
116116
block, # Block
117117
type, # string
118118
inputs, # dict<string, Variable>
119-
outputs,# dict<stirng, Variable>
119+
outputs,# dict<string, Variable>
120120
attrs # dict<string, Any>
121121
):
122122
self.desc = core.NewOpDesc(block.desc, type, inputs, outputs, attrs)

docs/dev_guides/api_contributing_guides/api_design_guidelines_standard_cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@
242242
| paddle2.0 之前 | pytorch | numpy | tensorflow | paddle2.0 之后 |
243243
| :------------- | :----- | :------ | :--------- | :--------------- |
244244
| elementwise_add | add | add | add | add |
245-
| elementwise_sub | sub | subtract | subtract | subract |
245+
| elementwise_sub | sub | subtract | subtract | subtract |
246246
| elementwise_mul | mul | multiply | multiply | multiply |
247247
| elementwise_div | div | divide | divide | divide |
248248
| elementwise_min | min | minimum | minimum | minimum |

docs/eval/【Hackathon No.113】 PR.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ else:
105105
```python
106106
if self._nranks > 1:
107107
dist.init_parallel_env()
108-
stradegy = fluid.dygraph.parallel.ParallelStrategy()
109-
stradegy.nranks = ParallelEnv().nranks
110-
stradegy.local_rank = ParallelEnv().local_rank
111-
stradegy.trainer_endpoints = ParallelEnv().trainer_endpoints
112-
stradegy.current_endpoint = ParallelEnv().current_endpoint
108+
strategy = fluid.dygraph.parallel.ParallelStrategy()
109+
strategy.nranks = ParallelEnv().nranks
110+
strategy.local_rank = ParallelEnv().local_rank
111+
strategy.trainer_endpoints = ParallelEnv().trainer_endpoints
112+
strategy.current_endpoint = ParallelEnv().current_endpoint
113113
self.ddp_model = fluid.dygraph.parallel.DataParallel(
114-
self.model.network, stradegy)
114+
self.model.network, strategy)
115115

116116
```
117117
这样的话,分布式的环境与分布式的模型就已经在 paddle.Model 内的内部构建完成了。

docs/guides/advanced/auto_type_promotion_en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Number | API | Tensor-to-Tensor | Tensor-to-Scalar |
230230
31 | huber_loss | Common Rule | - |
231231
32 | mse_loss | Common Rule | - |
232232

233-
There are two specail rules in this table above:
233+
There are two special rules in this table above:
234234

235235
- Divide Rule: For divide API, it will not return dtype smaller than float. Such as int32 / Scalar returns float32.
236236

0 commit comments

Comments
 (0)