diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 23116adf7..03311764a 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -9,6 +9,13 @@ jobs: os: [ubuntu-latest] sklearn_version: ['==1.5.0', '==1.4.2', '==1.3.2', '==1.2.2', '==1.1.3'] include: + - sklearn_version: '==1.5.0' + documentation: 1 + numpy_version: '>=1.21.1,<2.0' + scipy_version: '>=1.7.0' + onnx_version: 'onnx>=1.16.0' + onnxrt_version: 'onnxruntime>=1.19.0' + python_version: '3.11' - sklearn_version: '==1.5.0' documentation: 0 numpy_version: '>=1.21.1,<2.0' @@ -24,7 +31,7 @@ jobs: onnxrt_version: 'onnxruntime==1.18.1' sklearn_version: '==1.4.2' - python_version: '3.11' - documentation: 1 + documentation: 0 numpy_version: '>=1.21.1,<2.0' scipy_version: '>=1.7.0' onnx_version: 'onnx<1.16.0' diff --git a/.gitignore b/.gitignore index 8c9a8ba76..cf9a4b789 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ build/ # test generated files *.onnx +*.dot* *.whl .pytest_cache .cache diff --git a/docs/examples/plot_convert_syntax.py b/docs/examples/plot_convert_syntax.py index 819b28528..4dbc167eb 100644 --- a/docs/examples/plot_convert_syntax.py +++ b/docs/examples/plot_convert_syntax.py @@ -188,15 +188,22 @@ def to_onnx_operator( from onnx.tools.net_drawer import GetPydotGraph, GetOpNodeProducer -pydot_graph = GetPydotGraph( - onx.graph, - name=onx.graph.name, - rankdir="TB", - node_producer=GetOpNodeProducer( - "docstring", color="yellow", fillcolor="yellow", style="filled" - ), -) -pydot_graph.write_dot("pipeline_onnx_mixin.dot") +try: + pydot_graph = GetPydotGraph( + onx.graph, + name=onx.graph.name, + rankdir="TB", + node_producer=GetOpNodeProducer( + "docstring", color="yellow", fillcolor="yellow", style="filled" + ), + ) + pydot_graph.write_dot("pipeline_onnx_mixin.dot") +except AssertionError: + print("GetPydotGraph failed to produce a valid DOT graph. Trying something else.") + from onnx_array_api.plotting.dot_plot import to_dot + + with open("pipeline_onnx_mixin.dot", "w", encoding="utf-8") as f: + f.write(to_dot(onx)) import os diff --git a/docs/requirements.txt b/docs/requirements.txt index a14fffedd..02b4f3841 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -11,6 +11,7 @@ matplotlib mlinsights>=0.3.631 nbsphinx onnx +onnx-array-api onnxmltools onnxruntime pillow diff --git a/skl2onnx/operator_converters/random_forest.py b/skl2onnx/operator_converters/random_forest.py index 6cd4ec0ab..d52f08b2b 100644 --- a/skl2onnx/operator_converters/random_forest.py +++ b/skl2onnx/operator_converters/random_forest.py @@ -681,10 +681,5 @@ def convert_sklearn_random_forest_regressor_converter( register_converter( "SklearnHistGradientBoostingRegressor", convert_sklearn_random_forest_regressor_converter, - options={ - "zipmap": [True, False, "columns"], - "raw_scores": [True, False], - "output_class_labels": [False, True], - "nocl": [True, False], - }, + options={"raw_scores": [True, False]}, )