Skip to content

Commit 4c94727

Browse files
Merge pull request #1141 from onnx/tom/ImproveLargeModelErrDetection
Improved detection of conversion errors due to large models
2 parents 2c89c15 + 454c713 commit 4c94727

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tf2onnx/tf_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def _from_saved_model_v2(model_path, input_names, output_names, tag, signature_d
312312
try:
313313
frozen_graph = from_function(concrete_func, inputs, outputs, large_model)
314314
except ValueError as e:
315-
if "exceeds maximum protobuf size of 2GB" in str(e):
315+
if any(msg in str(e) for msg in ["exceeds maximum protobuf size of 2GB", "string too long"]):
316316
raise ValueError(err_large_model)
317317
raise e
318318

0 commit comments

Comments
 (0)