Skip to content

Commit

Permalink
Quality
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoin committed Apr 10, 2023
1 parent f0ba51c commit fd9dac6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sparseml/onnx/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ def validate_onnx_file(path: str):
"""
try:
onnx_model = check_load_model(path)

if onnx_model.ByteSize() < onnx.checker.MAXIMUM_PROTOBUF:
onnx.checker.check_model(onnx_model)
else:
_LOGGER.warning(
"onnx check_model skipped as model exceeds maximum protobuf size of 2GB"
)

if not onnx_model.opset_import:
raise ValueError("could not parse opset_import")
except Exception as err:
Expand Down

0 comments on commit fd9dac6

Please sign in to comment.