Skip to content

Commit

Permalink
[brief] Fixes a mypy error introduced by PyTorch 2.5.0.
Browse files Browse the repository at this point in the history
[detailed]
- They changed the type-hints for the onnx.export function, so just tell
  mypy to ignore the "error" as the code is still correct.
  • Loading branch information
marovira committed Oct 23, 2024
1 parent 9c9290e commit e890bd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helios/onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def export_to_onnx(
with torch.no_grad():
out = net(net_args)

torch.onnx.export(net, net_args, str(out_path), **kwargs)
torch.onnx.export(net, net_args, str(out_path), **kwargs) # type: ignore[arg-type]

onnx_model = onnx.load(out_path)
onnx.checker.check_model(onnx_model)
Expand Down

0 comments on commit e890bd6

Please sign in to comment.