Skip to content

Commit

Permalink
Merge branch 'main' into support-constant-simple-imputer-strings
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Bodnar <[email protected]>
  • Loading branch information
bodnarbm committed Sep 9, 2024
2 parents 09ee0fa + 587aacd commit 634a06e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 16 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ build/

# test generated files
*.onnx
*.dot*
*.whl
.pytest_cache
.cache
Expand Down
25 changes: 16 additions & 9 deletions docs/examples/plot_convert_syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ matplotlib
mlinsights>=0.3.631
nbsphinx
onnx
onnx-array-api
onnxmltools
onnxruntime
pillow
Expand Down
7 changes: 1 addition & 6 deletions skl2onnx/operator_converters/random_forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]},
)

0 comments on commit 634a06e

Please sign in to comment.