Skip to content

Commit f0f7589

Browse files
committed
spelling
1 parent 3148510 commit f0f7589

17 files changed

+60
-32
lines changed

.github/workflows/spell-check.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
ame: Spell Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
spell-check:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# Checkout the repository
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
# Install codespell
19+
- name: Install codespell
20+
run: |
21+
pip install codespell
22+
23+
# Run codespell
24+
- name: Run codespell
25+
run: |
26+
codespell --skip="*.png,*.jpg,*.jpeg,*.gif,*.svg,*.ico,*.pdf,*.js" --ignore-words-list="nd,te,OT" --check-filenames

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ Snapshot of usefuls tools
9999

100100
**max_diff**
101101

102-
Returns the maximum discrancies accross nested containers containing tensors.
102+
Returns the maximum discrancies across nested containers containing tensors.

_doc/examples/plot_export_tiny_llm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Steel method forward to guess the dynamic shapes
55
================================================
66
7-
Inputs are always dynamic with LLMs that is why dyanmic shapes
7+
Inputs are always dynamic with LLMs that is why dynamic shapes
88
needs to be specified when a LLM is exported with:func:`torch.export.export`.
99
Most of the examples on :epkg:`HuggingFace` use method
1010
:meth:`transformers.GenerationMixin.generate` but we only want to
@@ -15,7 +15,7 @@
1515
1616
We focus on the model
1717
`Tiny-LLM <https://huggingface.co/arnir0/Tiny-LLM>`_.
18-
To avoid downloading any weigths, we write a function creating a
18+
To avoid downloading any weights, we write a function creating a
1919
random model based on the same architecture.
2020
2121
Steel the forward method

_doc/examples/plot_export_with_dynamic_cache.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def forward(self, x, y):
5454
pprint.pprint(ds)
5555

5656
# %%
57-
# The function returns a tuple with two objets.
57+
# The function returns a tuple with two objects.
5858
# The first one for the positional arguments, the other one
59-
# for the named arguments. There is no named argements. We
59+
# for the named arguments. There is no named arguments. We
6060
# we used the first result to export.
6161

6262
ep = torch.export.export(model, (x, y), dynamic_shapes=ds[0])
@@ -66,7 +66,7 @@ def forward(self, x, y):
6666
# kwargs
6767
# ++++++
6868
#
69-
# We do the same with named argments.
69+
# We do the same with named arguments.
7070

7171

7272
class Model(torch.nn.Module):

_doc/examples/plot_export_with_dynamic_shapes_auto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Use DYNAMIC or AUTO when exporting if dynamic shapes has constraints
55
====================================================================
66
7-
Settings the dynamic shapes is not always easy.
7+
Setting the dynamic shapes is not always easy.
88
Here are a few tricks to make it work.
99
1010
dx + dy not allowed?

_doc/examples/plot_failing_model_extract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
oh.make_node("Cast", ["C"], ["X999"], to=999, name="failing"),
4040
oh.make_node("CastLike", ["X999", "Y"], ["Z"], name="n4"),
4141
],
42-
"nd",
42+
"-nd-",
4343
[
4444
oh.make_tensor_value_info("X", TFLOAT, ["a", "b", "c"]),
4545
oh.make_tensor_value_info("Y", TFLOAT, ["a", "b", "c"]),

_doc/examples/plot_failing_onnxruntime_evaluator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
how to run a python runtime on a model but it may very slow sometimes
99
and it could show some discrepancies if the only provider is not CPU.
1010
Let's use :class:`OnnxruntimeEvaluator <onnx_diagnostic.reference.OnnxruntimeEvaluator>`.
11-
It splits the model into node and runs them independantly until it succeeds
11+
It splits the model into node and runs them independently until it succeeds
1212
or fails. This class converts every node into model based on the types
1313
discovered during the execution. It relies on :class:`InferenceSessionForTorch
1414
<onnx_diagnostic.ort_session.InferenceSessionForTorch>` or
@@ -43,7 +43,7 @@
4343
oh.make_node("Cast", ["C"], ["X999"], to=999, name="failing"),
4444
oh.make_node("CastLike", ["X999", "Y"], ["Z"], name="n4"),
4545
],
46-
"nd",
46+
"-nd-",
4747
[
4848
oh.make_tensor_value_info("X", TBFLOAT16, ["a", "b", "c"]),
4949
oh.make_tensor_value_info("Y", TBFLOAT16, ["a", "b", "c"]),
@@ -100,7 +100,7 @@
100100
# %%
101101
# We can see it run until it reaches `Cast` and stops.
102102
# The error message is not always obvious to interpret.
103-
# It gets improved everytime from time to time.
103+
# It gets improved every time from time to time.
104104
# This runtime is useful when it fails for a numerical reason.
105105
# It is possible to insert prints in the python code to print
106106
# more information or debug if needed.

_doc/examples/plot_failing_reference_evaluator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
oh.make_node("Cast", ["C"], ["X999"], to=999, name="failing"),
3434
oh.make_node("CastLike", ["X999", "Y"], ["Z"], name="n4"),
3535
],
36-
"nd",
36+
"-nd-",
3737
[
3838
oh.make_tensor_value_info("X", TFLOAT, ["a", "b", "c"]),
3939
oh.make_tensor_value_info("Y", TFLOAT, ["a", "b", "c"]),
@@ -75,7 +75,7 @@
7575
# %%
7676
# We can see it run until it reaches `Cast` and stops.
7777
# The error message is not always obvious to interpret.
78-
# It gets improved everytime from time to time.
78+
# It gets improved every time from time to time.
7979
# This runtime is useful when it fails for a numerical reason.
8080
# It is possible to insert prints in the python code to print
8181
# more information or debug if needed.

_doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ onnx-diagnostic: investigate onnx models
1818
.. image:: https://codecov.io/gh/sdpython/onnx-diagnostic/branch/main/graph/badge.svg?token=Wb9ZGDta8J
1919
:target: https://codecov.io/gh/sdpython/onnx-diagnostic
2020

21-
**onnx-diagnostic** helps investgating onnx models, exporting models into onnx.
21+
**onnx-diagnostic** helps investigating onnx models, exporting models into onnx.
2222
It implements tools used to understand issues.
2323

2424
Source are `sdpython/onnx-diagnostic

_unittests/ut_xrun_doc/test_helpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_pretty_onnx(self):
8787
oh.make_node("Mul", ["Y", "sy"], ["ysy"]),
8888
oh.make_node("Mul", ["X", "ysy"], ["final"]),
8989
],
90-
"nd",
90+
"-nd-",
9191
[
9292
oh.make_tensor_value_info("X", TFLOAT, [1, "b", "c"]),
9393
oh.make_tensor_value_info("Y", TFLOAT, ["a", "b", "c"]),
@@ -111,7 +111,7 @@ def test_print_pretty_onnx(self):
111111
oh.make_node("Mul", ["Y", "sy"], ["ysy"]),
112112
oh.make_node("Mul", ["X", "ysy"], ["final"]),
113113
],
114-
"nd",
114+
"-nd-",
115115
[
116116
oh.make_tensor_value_info("X", TFLOAT, [1, "b", "c"]),
117117
oh.make_tensor_value_info("Y", TFLOAT, ["a", "b", "c"]),
@@ -136,7 +136,7 @@ def test_get_onnx_signature(self):
136136
oh.make_node("Mul", ["Y", "sy"], ["ysy"]),
137137
oh.make_node("Mul", ["X", "ysy"], ["final"]),
138138
],
139-
"nd",
139+
"-nd-",
140140
[
141141
oh.make_tensor_value_info("X", TFLOAT, [1, "b", "c"]),
142142
oh.make_tensor_value_info("Y", TFLOAT, ["a", "b", "c"]),

0 commit comments

Comments
 (0)