Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit c3f88fe

Browse files
committed
Enable target_opset in to_onnx
1 parent a5b242b commit c3f88fe

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mlprodict/onnxrt/validate/validate_helper.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,11 @@ def to_onnx(model, X=None, name=None, initial_types=None,
187187
from skl2onnx import convert_sklearn
188188

189189
if isinstance(model, OnnxOperatorMixin):
190-
if target_opset is not None:
191-
raise NotImplementedError(
192-
"target_opset not yet implemented for OnnxOperatorMixin.")
193190
if options is not None:
194191
raise NotImplementedError(
195192
"options not yet implemented for OnnxOperatorMixin.")
196-
return model.to_onnx(X=X, name=name, dtype=dtype)
193+
return model.to_onnx(X=X, name=name, dtype=dtype,
194+
target_opset=target_opset)
197195
if name is None:
198196
name = "ONNX(%s)" % model.__class__.__name__
199197
initial_types = guess_initial_types(X, initial_types)

0 commit comments

Comments
 (0)