@@ -11,5 +11,6 @@
Loading
11 11
class Add(OpRunBinaryNumpy):
12 12
13 13
    def __init__(self, onnx_node, desc=None, **options):
14 +
        "constructor"
14 15
        OpRunBinaryNumpy.__init__(self, numpy.add, onnx_node,
15 16
                                  desc=desc, **options)

@@ -16,7 +16,7 @@
Loading
16 16
17 17
    @param      skl_pred        prediction from :epkg:`scikit-learn`
18 18
                                or any other way
19 -
    @param      skl_ort         prediction from an :epkg:`ONNX` runtime
19 +
    @param      ort_pred        prediction from an :epkg:`ONNX` runtime
20 20
                                or any other way
21 21
    @param      batch           predictions are processed in a batch,
22 22
                                *skl_pred* and *ort_pred* should be arrays

@@ -78,6 +78,7 @@
Loading
78 78
79 79
        :param X: unused
80 80
        :param y: unused
81 +
        :param fit_params: additional parameter (unused)
81 82
        :return: self
82 83
        """
83 84
        from ..onnxrt.optim.onnx_helper import change_input_first_dimension

@@ -159,7 +159,7 @@
Loading
159 159
    :param model: any model
160 160
    :param onnx_model: *onnx* model or *None* to use an onnx converters to convert it
161 161
        only if the model accepts one float vector
162 -
    :param basemodel: three files are writen ``<basename>.data.pkl``,
162 +
    :param basename: three files are writen ``<basename>.data.pkl``,
163 163
        ``<basename>.model.pkl``, ``<basename>.model.onnx``
164 164
    :param folder: files are written in this folder,
165 165
        it is created if it does not exist, if *folder* is None,
@@ -437,6 +437,8 @@
Loading
437 437
438 438
    :param model: model, *scikit-learn*, *keras*,
439 439
         or *coremltools* object
440 +
    :param name: model name
441 +
    :param input_types: input types
440 442
    :return: *onnx* model
441 443
    """
442 444
    from skl2onnx import convert_sklearn

@@ -68,8 +68,10 @@
Loading
68 68
    """
69 69
    Dumps an object for debug purpose.
70 70
71 +
    @param      clname  class name
71 72
    @param      obj     object
72 73
    @param      folder  folder
74 +
    @param      ops     operator to dump
73 75
    @return             filename
74 76
    """
75 77
    def debug_print_(obj, prefix=''):

@@ -51,7 +51,7 @@
Loading
51 51
    :param white_op: see @see fn to_onnx
52 52
    :param black_op: see @see fn to_onnx
53 53
    :param final_types: see @see fn to_onnx
54 -
    :param target_opset: ONNX targeted opset
54 +
    :param op_version: ONNX targeted opset
55 55
56 56
    The class stores transformers before converting them into ONNX
57 57
    in attributes ``raw_steps_``.
@@ -63,19 +63,20 @@
Loading
63 63
64 64
    def __init__(self, steps, *, memory=None, verbose=False,
65 65
                 output_name=None, enforce_float32=True,
66 -
                 runtime='python', op_version=None, options=None,
67 -
                 white_op=None, black_op=None, final_types=None):
66 +
                 runtime='python', options=None,
67 +
                 white_op=None, black_op=None, final_types=None,
68 +
                 op_version=None):
68 69
        Pipeline.__init__(
69 70
            self, steps, memory=memory, verbose=verbose)
70 71
        self.output_name = output_name
71 72
        self.enforce_float32 = enforce_float32
72 73
        self.runtime = runtime
73 -
        self.op_version = op_version
74 74
        self.options = options
75 75
        self.white_op = white_op
76 76
        self.white_op = white_op
77 77
        self.black_op = black_op
78 78
        self.final_types = final_types
79 +
        self.op_version = op_version
79 80
80 81
    def fit(self, X, y=None, **fit_params):
81 82
        """
@@ -160,6 +161,7 @@
Loading
160 161
        """
161 162
        Converts a transformer into ONNX.
162 163
164 +
        @param  name                model name
163 165
        @param  fitted_transformer  fitted transformer
164 166
        @param  x_train             training dataset
165 167
        @return                     corresponding @see cl OnnxTransformer
@@ -177,6 +179,7 @@
Loading
177 179
        if 'options' in kwargs:
178 180
            kwargs['options'] = self._preprocess_options(
179 181
                name, kwargs['options'])
182 +
        kwargs['target_opset'] = self.op_version
180 183
        onx = to_onnx(fitted_transformer, x_train, **kwargs)
181 184
        tr = OnnxTransformer(
182 185
            onx.SerializeToString(), output_name=self.output_name,

@@ -4,7 +4,7 @@
Loading
4 4
@brief Ways to speed up predictions for a machine learned model.
5 5
"""
6 6
7 -
__version__ = "0.4.1237"
7 +
__version__ = "0.4.1240"
8 8
__author__ = "Xavier Dupré"
9 9
10 10

@@ -24,7 +24,7 @@
Loading
24 24
                        <https://matplotlib.org/api/_as_gen/matplotlib.pyplot.colorbar.html>`_.
25 25
                        Optional.
26 26
    @param  cbarlabel   the label for the colorbar. Optional.
27 -
    @aram   kwargs      all other arguments are forwarded to `imshow
27 +
    @param   kwargs     all other arguments are forwarded to `imshow
28 28
                        <https://matplotlib.org/api/_as_gen/matplotlib.pyplot.imshow.html>`_
29 29
    @return             ax, image, color bar
30 30
    """
@@ -86,7 +86,7 @@
Loading
86 86
    @param  threshold   value in data units according to which the colors from textcolors are
87 87
                        applied. If None (the default) uses the middle of the colormap as
88 88
                        separation. Optional.
89 -
    @param  kwargs      all other arguments are forwarded to each call to `text` used to create
89 +
    @param  textkw      all other arguments are forwarded to each call to `text` used to create
90 90
                        the text labels.
91 91
    @return             annotated objects
92 92
    """

@@ -1,7 +1,7 @@
Loading
1 1
"""
2 2
@file
3 3
@brief Functions which converts :epkg:`ONNX` object into
4 -
readable :epgk:`python` objects.
4 +
readable :epkg:`python` objects.
5 5
"""
6 6
import pprint
7 7
import warnings
Files Coverage
mlprodict 91.26%
Project Totals (225 files) 91.26%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading