Skip to content

Commit 705d744

Browse files
pre-commit-ci[bot]mengniwang95
authored andcommitted
[pre-commit.ci] pre-commit autoupdate (#1297)
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent f64833d commit 705d744

File tree

20 files changed

+23
-23
lines changed

20 files changed

+23
-23
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ repos:
128128
)$
129129
130130
- repo: https://github.com/codespell-project/codespell
131-
rev: v2.2.5
131+
rev: v2.2.6
132132
hooks:
133133
- id: codespell
134134
additional_dependencies:
@@ -140,7 +140,7 @@ repos:
140140
)$
141141
142142
- repo: https://github.com/astral-sh/ruff-pre-commit
143-
rev: v0.0.287
143+
rev: v0.0.292
144144
hooks:
145145
- id: ruff
146146
args: [--fix, --exit-non-zero-on-fix, --no-cache]

examples/pytorch/diffusion_model/diffusers/textual_inversion/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float
125125
# use gpu
126126
#pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to("cuda")
127127

128-
prompt = "a lovely <dicoo> in red dress and hat, in the snowly and brightly night, with many brighly buildings."
128+
prompt = "a lovely <dicoo> in red dress and hat, in the snowly and brightly night, with many brightly buildings."
129129

130130
image = pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]
131131

examples/pytorch/diffusion_model/diffusers/textual_inversion/distillation_for_quantization/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Once you have trained a INT8 model with the above command, the inference can be
4444
```bash
4545
python text2image.py \
4646
--pretrained_model_name_or_path=$INT8_MODEL_NAME \
47-
--caption "a lovely <dicoo> in red dress and hat, in the snowly and brightly night, with many brighly buildings." \
47+
--caption "a lovely <dicoo> in red dress and hat, in the snowly and brightly night, with many brightly buildings." \
4848
--images_num 4
4949
```
5050

examples/tensorflow/nlp/bert_large_squad/quantization/ptq/freeze_estimator_to_pb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def main(_):
312312
drop_remainder=False)
313313

314314
from neural_compressor.adaptor.tf_utils.util import is_ckpt_format
315-
assert is_ckpt_format(FLAGS.input_model), 'invalid chekpoint path....'
315+
assert is_ckpt_format(FLAGS.input_model), 'invalid checkpoint path....'
316316
ckpt_model = [os.path.splitext(i)[0] for i in os.listdir(FLAGS.input_model) \
317317
if i.endswith('.meta')][0]
318318
model_fn = model_fn_builder(

examples/tensorflow/nlp/bert_large_squad_model_zoo/quantization/ptq/freeze_estimator_to_pb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def main(_):
312312
drop_remainder=False)
313313

314314
from neural_compressor.adaptor.tf_utils.util import is_ckpt_format
315-
assert is_ckpt_format(FLAGS.input_model), 'invalid chekpoint path....'
315+
assert is_ckpt_format(FLAGS.input_model), 'invalid checkpoint path....'
316316
ckpt_model = [os.path.splitext(i)[0] for i in os.listdir(FLAGS.input_model) \
317317
if i.endswith('.meta')][0]
318318
model_fn = model_fn_builder(

neural_coder/graphers/function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def c():
5656
if is_in_function and line_idx == func_end_line_idx:
5757
is_in_function = False
5858

59-
# handle function's defnition line, to initiate a function
59+
# handle function's definition line, to initiate a function
6060
if not is_in_function and "def " in line: # only deal with outermost def
6161
function_name = line[line.find("def") + 4 : line.find("(")]
6262

neural_coder/utils/numa_launcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535

3636
class CPUinfo:
37-
"""Get CPU inforamation, such as cores list and NUMA information."""
37+
"""Get CPU information, such as cores list and NUMA information."""
3838

3939
def __init__(self):
4040
self.cpuinfo = []
@@ -460,7 +460,7 @@ def launch(self, args):
460460

461461

462462
class DistributedTrainingLauncher(Launcher):
463-
r"""Launcher for distributed traning with MPI launcher."""
463+
r"""Launcher for distributed training with MPI launcher."""
464464

465465
def get_mpi_pin_domain(self, nproc_per_node, ccl_worker_count, total_cores):
466466
"""I_MPI_PIN_DOMAIN specify the cores used for every MPI process.

neural_compressor/adaptor/keras.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ def train(self, model, dataloader, optimizer_tuple, criterion_tuple, hooks, post
867867
for i in range(len(list_len_dataloader) - 1):
868868
if list_len_dataloader[i] != list_len_dataloader[i + 1]:
869869
raise AttributeError(
870-
"The traning dataloader's iteration is"
870+
"The training dataloader's iteration is"
871871
"different between processes, please reset dataloader's batch_size."
872872
)
873873

neural_compressor/adaptor/onnxrt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ def query_fw_capability(self, model):
10941094

10951095
ffn_matmul = []
10961096
attention_matmul_optype = [node.op_type for node in attention_matmul]
1097-
# find matmul ops in feed forward network (FFN) structure which mainly in transfomers based NLP models
1097+
# find matmul ops in feed forward network (FFN) structure which mainly in transformers based NLP models
10981098
if len(attention_matmul) > 0 and "Attention" in attention_matmul_optype:
10991099
# model is optimized and Attention is fused,
11001100
# index of Attention is used as split to find FFN MatMul

neural_compressor/adaptor/ox_utils/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def quantize_data_per_channel(data, axis, quantize_range, qType, scheme):
363363

364364

365365
def dequantize_data_with_scale_zero(tensor_value, scale_value, zo_value): # pragma: no cover
366-
"""Dequantize tensor with sacale and zero point."""
366+
"""Dequantize tensor with scale and zero point."""
367367
return (tensor_value.astype(np.float32) - zo_value.astype(np.float32)) * scale_value
368368

369369

0 commit comments

Comments
 (0)