Skip to content

Commit

Permalink
Ignore mypy warnings from pre-existing code
Browse files Browse the repository at this point in the history
  • Loading branch information
gramalingam committed Jul 25, 2024
1 parent a0cc3db commit 9d9db37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion onnxscript/tools/benchmark/benchmark_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def common_export(
if exporter == "script":
torch.onnx.export(
model,
inputs,
inputs, # type: ignore[arg-type]
filename,
do_constant_folding=False,
input_names=[f"input{i}" for i in range(len(inputs))],
Expand Down
2 changes: 1 addition & 1 deletion onnxscript/tools/transformers_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def export_to_onnx(
prog = torch.onnx.export(model, args, dynamo=True) # pylint: disable=no-value-for-parameter
else:
prog = torch.onnx.dynamo_export(model, *args)
model_proto = prog.model_proto
model_proto = prog.model_proto # type: ignore[union-attr]

Check warning on line 44 in onnxscript/tools/transformers_models/__init__.py

View check run for this annotation

Codecov / codecov/patch

onnxscript/tools/transformers_models/__init__.py#L44

Added line #L44 was not covered by tests
if optimize:
model_proto = onnxscript.optimizer.optimize(
model_proto,
Expand Down

0 comments on commit 9d9db37

Please sign in to comment.