Skip to content

Commit 9895b96

Browse files
committed
fix typo
1 parent 1a34c98 commit 9895b96

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,10 @@ repos:
99
rev: v0.14.4
1010
hooks:
1111
- id: ruff-check
12-
args: [--fix, --exit-non-zero-on-fix, --no-cache]
12+
args: [--fix, --exit-non-zero-on-fix, --no-cache]
13+
14+
- repo: https://github.com/PFCCLab/typos-pre-commit-mirror.git
15+
rev: v1.39.2
16+
hooks:
17+
- id: typos
18+
args: [--force-exclude]

graph_net/constraint_util.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,20 +293,20 @@ def symbolize_data_input_dims(
293293
Returns new DynamicDimConstraints if success.
294294
Returns None if no symbolicable dim .
295295
"""
296-
unqiue_dims = []
296+
unique_dims = []
297297
dim2axes = {}
298298

299299
def dumpy_filter_fn(input_name, input_idx, axis, dim):
300300
if is_data_input(input_name):
301301
print("data_input", input_name, input_idx, axis, dim)
302-
if dim not in unqiue_dims:
303-
unqiue_dims.append(dim)
302+
if dim not in unique_dims:
303+
unique_dims.append(dim)
304304
dim2axes[dim] = []
305305
dim2axes[dim].append(axis)
306306
# No symbolization by returning False
307307
return False
308308

309-
# Collect input dimensions into `unqiue_dims`
309+
# Collect input dimensions into `unique_dims`
310310
assert dyn_dim_cstr.symbolize(dumpy_filter_fn) is None
311311
total_dim_gen_pass_names = ()
312312

@@ -323,7 +323,7 @@ def append_dim_gen_pass_names(dim_gen_pass_names):
323323
]
324324
)
325325

326-
for i, picked_dim in enumerate(unqiue_dims):
326+
for i, picked_dim in enumerate(unique_dims):
327327
logging.warning(f"{i=} {picked_dim=}")
328328
cur_dyn_dim_cstr = copy.deepcopy(dyn_dim_cstr)
329329

@@ -341,7 +341,7 @@ def filter_fn(input_name, input_idx, axis, dim):
341341
if not cur_dyn_dim_cstr.check_delta_symbol2example_value(sym2example_value):
342342
continue
343343
dim_axes_pairs = tuple(
344-
(dim, axes) for dim in unqiue_dims[: i + 1] for axes in [dim2axes[dim]]
344+
(dim, axes) for dim in unique_dims[: i + 1] for axes in [dim2axes[dim]]
345345
)
346346
ctx_mgr = dyn_dim_cstr_feasibility_ctx_mgr
347347
logging.warning("before dyn_dim_cstr_feasibility_ctx_mgr")

graph_net/dynamic_dim_constraints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def get_module_attr(cls, module, attr, default):
154154
return getattr(module, attr) if hasattr(module, attr) else default
155155

156156
@classmethod
157-
def load_module(cls, path, name="unamed"):
157+
def load_module(cls, path, name="unnamed"):
158158
spec = imp.spec_from_file_location(name, path)
159159
module = imp.module_from_spec(spec)
160160
spec.loader.exec_module(module)

graph_net/imp_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import importlib.util as imp
22

33

4-
def load_module(path, name="unamed"):
4+
def load_module(path, name="unnamed"):
55
spec = imp.spec_from_file_location(name, path)
66
module = imp.module_from_spec(spec)
77
module.__file__ = path

graph_net/tensor_meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def _convert_cls_to_attrs(cls, tensor_meta_cls):
4848
return attrs
4949

5050
@classmethod
51-
def _get_classes(cls, file_path, name="unamed"):
51+
def _get_classes(cls, file_path, name="unnamed"):
5252
spec = imp.spec_from_file_location("unnamed", file_path)
5353
unnamed = imp.module_from_spec(spec)
5454
spec.loader.exec_module(unnamed)

0 commit comments

Comments
 (0)