Skip to content

Commit

Permalink
Improves documentation (#1060)
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Dupre <[email protected]>
  • Loading branch information
xadupre authored Jan 24, 2024
1 parent 88a822b commit 76847a6
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ docs/auto_examples
docs/examples/graph*.*
docs/examples/*.onnx
docs/examples/pipeline*.dot*
docs/sg_execution_times.rst
tests/TESTDUMP
tests/tests_dump
tests/graph.dot*
Expand Down
6 changes: 4 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@
"numpy": "https://numpy.org/",
"onnx": "https://github.com/onnx/onnx",
"ONNX": "https://onnx.ai/",
"ONNX operators": "https://github.com/onnx/onnx/blob/master/docs/Operators.md",
"ONNX ML operators": "https://github.com/onnx/onnx/blob/master/docs/Operators-ml.md",
"ONNX operators": "https://onnx.ai/onnx/operators/",
"ONNX ML operators": "https://onnx.ai/onnx/operators/",
"ONNX ML Operators": "https://onnx.ai/onnx/operators/",
"onnxmltools": "https://github.com/onnx/onnxmltools",
"onnxruntime": "https://microsoft.github.io/onnxruntime/",
"openmp": "https://en.wikipedia.org/wiki/OpenMP",
Expand All @@ -127,6 +128,7 @@
"pytorch": "https://pytorch.org/",
"scikit-learn": "https://scikit-learn.org/stable/",
"skorch": "https://skorch.readthedocs.io/en/stable/",
"skl2onnx": "https://github.com/onnx/sklearn-onnx",
"sklearn-onnx": "https://github.com/onnx/sklearn-onnx",
"sphinx-gallery": "https://github.com/sphinx-gallery/sphinx-gallery",
"xgboost": "https://xgboost.readthedocs.io/en/latest/",
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/plot_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
# Let's use ONNX backend API to test it.

model = onnx.load(name)
rep = backend.prepare(model, "CPU")
rep = backend.prepare(model)
x = np.array(
[[-1.0, -2.0, 5.0, 6.0], [-1.0, -2.0, -3.0, -4.0], [-1.0, -2.0, 7.0, 8.0]],
dtype=np.float32,
Expand All @@ -62,7 +62,7 @@
# The backend can also directly load the model
# without using *onnx*.

rep = backend.prepare(name, "CPU")
rep = backend.prepare(name)
x = np.array(
[[-1.0, -2.0, -3.0, -4.0], [-1.0, -2.0, -3.0, -4.0], [-1.0, -2.0, -3.0, -4.0]],
dtype=np.float32,
Expand Down
2 changes: 0 additions & 2 deletions docs/examples/plot_pipeline_xgboost.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@


"""
.. _example-xgboost:
Convert a pipeline with a XGBoost model
========================================
Expand Down
7 changes: 6 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ onnx nodes.
.. runpython::
:showcode:

from skl2onnx import __max_supported_opset__
from skl2onnx import __max_supported_opset__, __version__
print("documentation for version:", __version__)
print("Last supported opset:", __max_supported_opset__)

**Backend**
Expand Down Expand Up @@ -125,3 +126,7 @@ Shouheng Yi, Shauheen Zahirazami, Yiwen Zhu, Du Li, Xuan Li, Wenbing Li.
**License**

It is licensed with `Apache License v2.0 <../LICENSE>`_.

**Older versions**

* `1.16.0 <versions/v1.16.0/>`
4 changes: 2 additions & 2 deletions docs/parameterized.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ produces this part of the graph but there exist two options.
The first one is using *Scan* operator, the second one is
using a dedicated operator called *CDist* which is not part
of the regular ONNX operator until issue
`2442 <https://github.com/onnx/onnx/issues/2442>`_
`#2442 <https://github.com/onnx/onnx/issues/2442>`_
is addressed. By default, *Scan* is used, *CDist* can be used
by giving:

Expand Down Expand Up @@ -58,7 +58,7 @@ ZipMap

The operator *ZipMap* produces a list of dictionaries.
It repeats class names or ids but that's not necessary
(see issue `2149 <https://github.com/onnx/onnx/issues/2149>`_).
(see issue `#2149 <https://github.com/onnx/onnx/issues/2149>`_).
By default, ZipMap operator is added, it can be deactivated by using:

::
Expand Down
2 changes: 0 additions & 2 deletions docs/tutorial/plot_gexternal_xgboost.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@


"""
.. _example-xgboost:
Convert a pipeline with a XGBoost model
========================================
Expand Down
2 changes: 0 additions & 2 deletions skl2onnx/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ def convert_sklearn(
in input data and the ONNX graph
(defined by parameter *initial_types*), only integers are supported.
.. _l-conv-options:
Converters options
++++++++++++++++++
Expand Down
6 changes: 0 additions & 6 deletions skl2onnx/operator_converters/text_vectoriser.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,6 @@ def convert_sklearn_text_vectorizer(
Regular expression ``[^\\\\\\\\n]`` is used to split
a sentance into character (and not works) if ``analyser=='char'``.
The mode ``analyser=='char_wb'`` is not implemented.
.. versionchanged:: 1.6
Parameters have been renamed: *sep* into *separators*,
*regex* into *tokenexp*.
````
""" # noqa
op = operator.raw_operator

Expand Down

0 comments on commit 76847a6

Please sign in to comment.