Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary options for Regressor #1124

Merged
merged 5 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]},
)
Loading