Skip to content

Commit

Permalink
fix opset
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Dupre <[email protected]>
  • Loading branch information
xadupre committed Apr 2, 2024
1 parent cb5b4c3 commit aaf2e85
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/xgboost/test_xgboost_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def xgbregressor_shape_calculator(operator):
initial_type = [("float_input", FloatTensorType([None, X.shape[1]]))]

# Convert XGBoost model to ONNX
onnx_model = convert_sklearn(model, initial_types=initial_type, target_opset=12)
onnx_model = convert_sklearn(
model, initial_types=initial_type, target_opset={"": 12, "ai.onnx.ml": 3}
)
self.assertIn("dim_value: 2", str(onnx_model.graph.output))

sess = onnxruntime.InferenceSession(
Expand Down

0 comments on commit aaf2e85

Please sign in to comment.