Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
xadupre committed Jul 22, 2023
1 parent b0fd412 commit 687a7af
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion onnxruntime/python/tools/quantization/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


class TensorData:
_allowed = {"avg", "std", "lowest", "highest", "hist", "hist_edges"}
_allowed: set[str] = {"avg", "std", "lowest", "highest", "hist", "hist_edges"}

def __init__(self, **kwargs):
for k, v in kwargs.items():
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/python/tools/quantization/onnx_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def __replace_gemm_with_matmul(graph_path):
if input.name == inputB:
Bs_graph.input.remove(input)
break
self._check(B_trans)
Bs_graph._check(B_trans)
Bs_graph.initializer.extend([B_trans])
else:
inputB += "_Transposed" # noqa: N806
Expand Down
1 change: 0 additions & 1 deletion onnxruntime/test/python/quantization/test_op_gemm.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ def static_quant_test(
["o", 0, activation_proto_qtype],
]
}
qtop

if activation_type_str == "f8e4m3fn" and weight_type_str == "f8e4m3fn":
with open(model_int8_path, "rb") as f:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ unfixable = [
"orttraining/orttraining/test/**" = ["N802"] # Function casing
"tools/nuget/generate_nuspec_for_native_nuget.py" = ["ISC003"] # Too many errors to fix
"onnxruntime/test/python/quantization/test_op_gemm.py" = ["N806"] # use of A for a matrix
"onnxruntime/test/python/quantization/op_test_utils.py" = ["N806"] # use of A for a matrix
"onnxruntime/test/python/quantization/op_test_utils.py" = ["N806", "PERF203", "RUF012"] # use of A for a matrix

0 comments on commit 687a7af

Please sign in to comment.