Benchmark, comparison scikit-learn - onnxruntime-training#

The benchmark compares the processing time between scikit-learn and onnxruntime-training on a linear regression and a neural network. It uses the model trained in Train a scikit-learn neural network with onnxruntime-training on GPU.

First comparison: neural network#

import warnings
from pprint import pprint
import time
import numpy
import matplotlib.pyplot as plt
from pandas import DataFrame
from onnxruntime import get_device
from pyquickhelper.pycode.profiling import profile, profile2graph
from sklearn.datasets import make_regression
from sklearn.model_selection import train_test_split
from sklearn.neural_network import MLPRegressor
from mlprodict.onnx_conv import to_onnx
from onnxcustom.utils.orttraining_helper import (
    add_loss_output, get_train_initializer)
from onnxcustom.training.optimizers import OrtGradientOptimizer


X, y = make_regression(1000, n_features=100, bias=2)
X = X.astype(numpy.float32)
y = y.astype(numpy.float32)
X_train, X_test, y_train, y_test = train_test_split(X, y)

Benchmark function.

def benchmark(skl_model, train_session, name, verbose=True):
    """
    :param skl_model: model from scikit-learn
    :param train_session: instance of OrtGradientOptimizer
    :param name: experiment name
    :param verbose: to debug
    """
    print(f"[benchmark] {name}")
    begin = time.perf_counter()
    skl_model.fit(X, y)
    duration_skl = time.perf_counter() - begin
    length_skl = len(skl_model.loss_curve_)
    print(
        f"[benchmark] skl={length_skl!r} iterations - {duration_skl!r} seconds")

    begin = time.perf_counter()
    train_session.fit(X, y)
    duration_ort = time.perf_counter() - begin
    length_ort = len(train_session.train_losses_)
    print(
        f"[benchmark] ort={length_ort!r} iterations - {duration_ort!r} seconds")

    return dict(skl=duration_skl, ort=duration_ort, name=name,
                iter_skl=length_skl, iter_ort=length_ort,
                losses_skl=skl_model.loss_curve_,
                losses_ort=train_session.train_losses_)

Common parameters and model

batch_size = 15
max_iter = 100

nn = MLPRegressor(hidden_layer_sizes=(50, 10), max_iter=max_iter,
                  solver='sgd', learning_rate_init=5e-4, alpha=0,
                  n_iter_no_change=max_iter * 3, batch_size=batch_size,
                  nesterovs_momentum=False, momentum=0,
                  learning_rate='invscaling')

with warnings.catch_warnings():
    warnings.simplefilter('ignore')
    nn.fit(X_train, y_train)

Conversion to ONNX and trainer initialization

onx = to_onnx(nn, X_train[:1].astype(numpy.float32), target_opset=15)
onx_train = add_loss_output(onx)

weights = get_train_initializer(onx)
pprint(list((k, v[0].shape) for k, v in weights.items()))

train_session = OrtGradientOptimizer(
    onx_train, list(weights), device='cpu', learning_rate=1e-5,
    warm_start=False, max_iter=max_iter, batch_size=batch_size)


benches = [benchmark(nn, train_session, name='NN-CPU')]
[('coefficient', (100, 50)),
 ('intercepts', (1, 50)),
 ('coefficient1', (50, 10)),
 ('intercepts1', (1, 10)),
 ('coefficient2', (10, 1)),
 ('intercepts2', (1, 1))]
[benchmark] NN-CPU
somewhere/workspace/onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:679: ConvergenceWarning: Stochastic Optimizer: Maximum iterations (100) reached and the optimization hasn't converged yet.
  warnings.warn(
[benchmark] skl=100 iterations - 9.01983135798946 seconds
[benchmark] ort=100 iterations - 3.5001193080097437 seconds

Profiling#

def clean_name(text):
    pos = text.find('onnxruntime')
    if pos >= 0:
        return text[pos:]
    pos = text.find('onnxcustom')
    if pos >= 0:
        return text[pos:]
    pos = text.find('site-packages')
    if pos >= 0:
        return text[pos:]
    return text


ps = profile(lambda: benchmark(nn, train_session, name='NN-CPU'))[0]
root, nodes = profile2graph(ps, clean_text=clean_name)
text = root.to_text()
print(text)
[benchmark] NN-CPU
somewhere/workspace/onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:679: ConvergenceWarning: Stochastic Optimizer: Maximum iterations (100) reached and the optimization hasn't converged yet.
  warnings.warn(
[benchmark] skl=100 iterations - 10.36645060707815 seconds
[benchmark] ort=100 iterations - 3.5928091478999704 seconds
isfunction                                                   --      6      6 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/inspect.py:159:isfunction (isfunction)
name                                                         --    101    101 -- 0.00003 0.00003 -- /usr/local/lib/python3.9/inspect.py:2565:name (name)
kind                                                         --     82     82 -- 0.00003 0.00003 -- /usr/local/lib/python3.9/inspect.py:2577:kind (kind)
parameters                                                   --      7      7 -- 0.00000 0.00000 -- /usr/local/lib/python3.9/inspect.py:2882:parameters (parameters)
signature                                                    --      3      3 -- 0.00001 0.00100 -- /usr/local/lib/python3.9/inspect.py:3128:signature (signature)
    from_callable                                            --      3      3 -- 0.00001 0.00099 -- /usr/local/lib/python3.9/inspect.py:2876:from_callable (from_callable)
        _signature_from_callable                             --      3      3 -- 0.00007 0.00098 -- /usr/local/lib/python3.9/inspect.py:2244:_signature_from_callable (_signature_from_callable)
            isfunction                                       --      3      3 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/inspect.py:159:isfunction (isfunction) +++
            unwrap                                           --      3      3 -- 0.00002 0.00003 -- /usr/local/lib/python3.9/inspect.py:494:unwrap (unwrap)
                _is_wrapper                                  --      3      3 -- 0.00000 0.00001 -- /usr/local/lib/python3.9/inspect.py:514:_is_wrapper (_is_wrapper)
            _signature_from_function                         --      3      3 -- 0.00029 0.00087 -- /usr/local/lib/python3.9/inspect.py:2150:_signature_from_function (_signature_from_function)
                isfunction                                   --      3      3 -- 0.00000 0.00000 -- /usr/local/lib/python3.9/inspect.py:159:isfunction (isfunction) +++
                __init__                                     --     34     34 -- 0.00023 0.00039 -- /usr/local/lib/python3.9/inspect.py:2515:__init__ (__init__)
                    __call__                                 --     34     34 -- 0.00009 0.00012 -- /usr/local/lib/python3.9/enum.py:289:__call__ (__call__)
                        __new__                              --     34     34 -- 0.00003 0.00003 -- /usr/local/lib/python3.9/enum.py:580:__new__ (__new__)
                    <method 'isidentifier' of 'str' objects> --     34     34 -- 0.00003 0.00003 -- ~:0:<method 'isidentifier' of 'str' objects> (<method 'isidentifier' of 'str' objects>)
                    <built-in method builtins.isinstance>    --     34     34 -- 0.00002 0.00002 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
                __init__                                     --      3      3 -- 0.00009 0.00014 -- /usr/local/lib/python3.9/inspect.py:2798:__init__ (__init__)
                    <genexpr>                                --     37     37 -- 0.00004 0.00005 -- /usr/local/lib/python3.9/inspect.py:2847:<genexpr> (<genexpr>)
                        name                                 --     34     34 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/inspect.py:2565:name (name) +++
                <method 'append' of 'list' objects>          --     34     34 -- 0.00002 0.00002 -- ~:0:<method 'append' of 'list' objects> (<method 'append' of 'list' objects>) +++
                <method 'get' of 'dict' objects>             --     58     58 -- 0.00002 0.00002 -- ~:0:<method 'get' of 'dict' objects> (<method 'get' of 'dict' objects>) +++
filter                                                       --     18     18 -- 0.00006 0.00015 -- /usr/local/lib/python3.9/logging/__init__.py:787:filter (filter)
    filter                                                   --     12     12 -- 0.00002 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/logging.py:351:filter (filter)
    filter                                                   --      6      6 -- 0.00004 0.00005 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/logging.py:484:filter (filter)
        <built-in method builtins.isinstance>                --     18     18 -- 0.00001 0.00001 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
    <built-in method builtins.hasattr>                       --     18     18 -- 0.00002 0.00002 -- ~:0:<built-in method builtins.hasattr> (<built-in method builtins.hasattr>) +++
acquire                                                      --     30     30 -- 0.00006 0.00009 -- /usr/local/lib/python3.9/logging/__init__.py:892:acquire (acquire)
    <method 'acquire' of '_thread.RLock' objects>            --     30     30 -- 0.00003 0.00003 -- ~:0:<method 'acquire' of '_thread.RLock' objects> (<method 'acquire' of '_thread.RLock' objects>)
release                                                      --     30     30 -- 0.00005 0.00006 -- /usr/local/lib/python3.9/logging/__init__.py:899:release (release)
    <method 'release' of '_thread.RLock' objects>            --     30     30 -- 0.00001 0.00001 -- ~:0:<method 'release' of '_thread.RLock' objects> (<method 'release' of '_thread.RLock' objects>)
emit                                                         --     12     12 -- 0.00007 0.00091 -- /usr/local/lib/python3.9/logging/__init__.py:1067:emit (emit)
    format                                                   --     12     12 -- 0.00003 0.00046 -- /usr/local/lib/python3.9/logging/__init__.py:912:format (format)
        format                                               --     12     12 -- 0.00008 0.00043 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/logging.py:531:format (format)
            format                                           --     12     12 -- 0.00007 0.00032 -- /usr/local/lib/python3.9/logging/__init__.py:646:format (format)
                usesTime                                     --     12     12 -- 0.00002 0.00007 -- /usr/local/lib/python3.9/logging/__init__.py:624:usesTime (usesTime)
                    usesTime                                 --     12     12 -- 0.00003 0.00005 -- /usr/local/lib/python3.9/logging/__init__.py:417:usesTime (usesTime)
                        <method 'find' of 'str' objects>     --     12     12 -- 0.00002 0.00002 -- ~:0:<method 'find' of 'str' objects> (<method 'find' of 'str' objects>)
                formatMessage                                --     12     12 -- 0.00002 0.00008 -- /usr/local/lib/python3.9/logging/__init__.py:630:formatMessage (formatMessage)
                    format                                   --     12     12 -- 0.00002 0.00006 -- /usr/local/lib/python3.9/logging/__init__.py:428:format (format)
                        _format                              --     12     12 -- 0.00004 0.00004 -- /usr/local/lib/python3.9/logging/__init__.py:425:_format (_format)
                getMessage                                   --     12     12 -- 0.00005 0.00011 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/logging.py:89:getMessage (getMessage)
                    getMessage                               --     12     12 -- 0.00004 0.00004 -- /usr/local/lib/python3.9/logging/__init__.py:354:getMessage (getMessage)
                    <built-in method builtins.getattr>       --     12     12 -- 0.00001 0.00001 -- ~:0:<built-in method builtins.getattr> (<built-in method builtins.getattr>) +++
            colorize                                         --      2      2 -- 0.00001 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/console.py:72:colorize (colorize)
                escseq                                       --      4      4 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/console.py:73:escseq (escseq)
            <built-in method builtins.getattr>               --     12     12 -- 0.00001 0.00001 -- ~:0:<built-in method builtins.getattr> (<built-in method builtins.getattr>) +++
    flush                                                    --     12     12 -- 0.00006 0.00032 -- /usr/local/lib/python3.9/logging/__init__.py:1056:flush (flush)
        acquire                                              --     12     12 -- 0.00002 0.00003 -- /usr/local/lib/python3.9/logging/__init__.py:892:acquire (acquire) +++
        release                                              --     12     12 -- 0.00002 0.00003 -- /usr/local/lib/python3.9/logging/__init__.py:899:release (release) +++
        flush                                                --      6      6 -- 0.00002 0.00019 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/logging.py:557:flush (flush)
            <method 'flush' of '_io.TextIOWrapper' objects>  --      6      6 -- 0.00017 0.00017 -- ~:0:<method 'flush' of '_io.TextIOWrapper' objects> (<method 'flush' of '_io.TextIOWrapper' objects>)
        <built-in method builtins.hasattr>                   --     12     12 -- 0.00001 0.00001 -- ~:0:<built-in method builtins.hasattr> (<built-in method builtins.hasattr>) +++
    write                                                    --      6      6 -- 0.00002 0.00003 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/logging.py:549:write (write)
    write                                                    --      6      6 -- 0.00002 0.00003 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/logging.py:567:write (write)
isEnabledFor                                                 --     12     12 -- 0.00002 0.00002 -- /usr/local/lib/python3.9/logging/__init__.py:1677:isEnabledFor (isEnabledFor)
__init__                                                     --      2      2 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/warnings.py:403:__init__ (__init__)
<lambda>                                                     --      1      1 -- 0.00000 13.96119 -- onnxcustom/onnxcustom_UT_39_std/_doc/examples/plot_orttraining_benchmark.py:124:<lambda> (<lambda>)
    benchmark                                                --      1      1 -- 0.00011 13.96118 -- onnxcustom/onnxcustom_UT_39_std/_doc/examples/plot_orttraining_benchmark.py:46:benchmark (benchmark)
        fit                                                  --      1      1 -- 0.00576 3.59277 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/optimizers.py:79:fit (fit)
            __init__                                         --      1      1 -- 0.00004 0.00009 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/data_loader.py:31:__init__ (__init__)
                get_ort_device                               --      1      1 -- 0.00000 0.00000 -- onnxruntime_helper.py:63:get_ort_device (get_ort_device)
                numpy_to_ort_value                           --      2      2 -- 0.00001 0.00004 -- onnxruntime_helper.py:133:numpy_to_ort_value (numpy_to_ort_value) +++
            <listcomp>                                       --      1      1 -- 0.00003 0.00003 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/optimizers.py:96:<listcomp> (<listcomp>)
            <listcomp>                                       --      1      1 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/optimizers.py:131:<listcomp> (<listcomp>)
            <listcomp>                                       --      1      1 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/optimizers.py:132:<listcomp> (<listcomp>)
            _iteration                                       --    100    100 -- 2.95887 3.55918 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/optimizers.py:194:_iteration (_iteration)
                iter_bind                                    --   6800   6800 -- 0.05062 0.56841 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/data_loader.py:188:iter_bind (iter_bind)
                    _next_iter                               --   6700   6700 -- 0.02880 0.26717 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/data_loader.py:98:_next_iter (_next_iter)
                        <method 'randint'...mState' objects> --   6700   6700 -- 0.22612 0.22612 -- ~:0:<method 'randint' of 'numpy.random.mtrand.RandomState' objects> (<method 'randint' of 'numpy.random.mtrand.RandomState' objects>)
                        <built-in method builtins.len>       --   6700   6700 -- 0.00735 0.01225 -- ~:0:<built-in method builtins.len> (<built-in method builtins.len>) +++
                    local_bind                               --   6700   6700 -- 0.21841 0.21841 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/data_loader.py:209:local_bind (local_bind)
                    <built-in method builtins.len>           --   7100   7100 -- 0.01728 0.03221 -- ~:0:<built-in method builtins.len> (<built-in method builtins.len>) +++
                _bind_input_ortvalue                         --    100    100 -- 0.00133 0.00140 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/optimizers.py:167:_bind_input_ortvalue (_bind_input_ortvalue)
                    <built-in method builtins.isinstance>    --    200    200 -- 0.00007 0.00007 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
                <method 'mean' of 'numpy.ndarray' objects>   --    100    100 -- 0.00060 0.01175 -- ~:0:<method 'mean' of 'numpy.ndarray' objects> (<method 'mean' of 'numpy.ndarray' objects>) +++
                <built-in method numpy.array>                --    100    100 -- 0.01226 0.01226 -- ~:0:<built-in method numpy.array> (<built-in method numpy.array>) +++
                <method 'append' of 'list' objects>          --   6700   6700 -- 0.00650 0.00650 -- ~:0:<method 'append' of 'list' objects> (<method 'append' of 'list' objects>) +++
            _create_training_session                         --      1      1 -- 0.00018 0.02071 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/optimizers.py:275:_create_training_session (_create_training_session)
                <dictcomp>                                   --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/optimizers.py:323:<dictcomp> (<dictcomp>)
                <dictcomp>                                   --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/optimizers.py:325:<dictcomp> (<dictcomp>)
                __init__                                     --      1      1 -- 0.02018 0.02026 -- onnxruntime/capi/training/training_session.py:19:__init__ (__init__)
                    check_and_normalize_provider_args        --      1      1 -- 0.00004 0.00007 -- onnxruntime/capi/onnxruntime_inference_collection.py:24:check_and_normalize_provider_args (check_and_normalize_provider_args)
                        set_provider_options                 --      1      1 -- 0.00001 0.00001 -- onnxruntime/capi/onnxruntime_inference_collection.py:52:set_provider_options (set_provider_options)
                            <dictcomp>                       --      1      1 -- 0.00000 0.00000 -- onnxruntime/capi/onnxruntime_inference_collection.py:63:<dictcomp> (<dictcomp>)
                    __init__                                 --      1      1 -- 0.00000 0.00000 -- onnxruntime/capi/onnxruntime_inference_collection.py:107:__init__ (__init__)
                device_to_providers                          --      1      1 -- 0.00002 0.00002 -- onnxruntime_helper.py:149:device_to_providers (device_to_providers)
                <method 'SerializeToS...e.CMessage' objects> --      1      1 -- 0.00024 0.00024 -- ~:0:<method 'SerializeToString' of 'google.protobuf.pyext._message.CMessage' objects> (<method 'SerializeToString' of 'google.protobuf.pyext._message.CMessage' objects>)
            get_state                                        --      1      1 -- 0.00001 0.00022 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/optimizers.py:340:get_state (get_state)
                get_state                                    --      1      1 -- 0.00020 0.00020 -- onnxruntime/capi/training/training_session.py:52:get_state (get_state) +++
            set_state                                        --      1      1 -- 0.00001 0.00007 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/optimizers.py:372:set_state (set_state)
                load_state                                   --      1      1 -- 0.00007 0.00007 -- onnxruntime/capi/training/training_session.py:64:load_state (load_state)
            value                                            --    101    101 -- 0.00013 0.00013 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/sgd_learning_rate.py:186:value (value)
            init_learning_rate                               --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/sgd_learning_rate.py:205:init_learning_rate (init_learning_rate)
            update_learning_rate                             --    100    100 -- 0.00270 0.00270 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/sgd_learning_rate.py:226:update_learning_rate (update_learning_rate)
            get_inputs                                       --      1      1 -- 0.00000 0.00000 -- onnxruntime/capi/onnxruntime_inference_collection.py:117:get_inputs (get_inputs)
            get_outputs                                      --      1      1 -- 0.00000 0.00000 -- onnxruntime/capi/onnxruntime_inference_collection.py:121:get_outputs (get_outputs)
            io_binding                                       --      1      1 -- 0.00000 0.00002 -- onnxruntime/capi/onnxruntime_inference_collection.py:276:io_binding (io_binding)
                __init__                                     --      1      1 -- 0.00002 0.00002 -- onnxruntime/capi/onnxruntime_inference_collection.py:444:__init__ (__init__)
            __del__                                          --      1      1 -- 0.00001 0.00001 -- onnxruntime/capi/training/training_session.py:48:__del__ (__del__)
            get_state                                        --      1      1 -- 0.00007 0.00007 -- onnxruntime/capi/training/training_session.py:52:get_state (get_state) +++
            numpy_to_ort_value                               --    100    100 -- 0.00053 0.00230 -- onnxruntime_helper.py:133:numpy_to_ort_value (numpy_to_ort_value) +++
            <method 'randn' of 'num....RandomState' objects> --      6      6 -- 0.00055 0.00055 -- ~:0:<method 'randn' of 'numpy.random.mtrand.RandomState' objects> (<method 'randn' of 'numpy.random.mtrand.RandomState' objects>)
            <built-in method numpy.array>                    --    100    100 -- 0.00077 0.00077 -- ~:0:<built-in method numpy.array> (<built-in method numpy.array>) +++
            <method 'append' of 'list' objects>              --    100    100 -- 0.00007 0.00007 -- ~:0:<method 'append' of 'list' objects> (<method 'append' of 'list' objects>) +++
        fit                                                  --      1      1 -- 0.00002 10.36644 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:723:fit (fit)
            _validate_params                                 --      1      1 -- 0.00002 0.00285 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/base.py:562:_validate_params (_validate_params)
                get_params                                   --      1      1 -- 0.00003 0.00085 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/base.py:153:get_params (get_params)
                    _get_param_names                         --      1      1 -- 0.00005 0.00081 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/base.py:122:_get_param_names (_get_param_names)
                        kind                                 --     23     23 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/inspect.py:2577:kind (kind) +++
                        parameters                           --      1      1 -- 0.00000 0.00000 -- /usr/local/lib/python3.9/inspect.py:2882:parameters (parameters) +++
                        signature                            --      1      1 -- 0.00001 0.00067 -- /usr/local/lib/python3.9/inspect.py:3128:signature (signature) +++
                        <listcomp>                           --      1      1 -- 0.00004 0.00006 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/base.py:136:<listcomp> (<listcomp>)
                            name                             --     24     24 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/inspect.py:2565:name (name) +++
                            kind                             --     23     23 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/inspect.py:2577:kind (kind) +++
                        <listcomp>                           --      1      1 -- 0.00001 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/base.py:151:<listcomp> (<listcomp>)
                            name                             --     23     23 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/inspect.py:2565:name (name) +++
                    <built-in method builtins.getattr>       --     23     23 -- 0.00001 0.00001 -- ~:0:<built-in method builtins.getattr> (<built-in method builtins.getattr>) +++
                validate_parameter_constraints               --      1      1 -- 0.00015 0.00199 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:28:validate_parameter_constraints (validate_parameter_constraints) +++
            _fit                                             --      1      1 -- 0.00011 10.36356 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:417:_fit (_fit)
                any                                          --      1      1 -- 0.00001 0.00008 -- <__array_function__ internals>:177:any (any)
                    _any_dispatcher                          --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:2328:_any_dispatcher (_any_dispatcher)
                _initialize                                  --      1      1 -- 0.00004 0.00049 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:357:_initialize (_initialize)
                    is_classifier                            --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/base.py:993:is_classifier (is_classifier)
                    _init_coef                               --      3      3 -- 0.00008 0.00044 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:400:_init_coef (_init_coef)
                        <method 'uniform'...mState' objects> --      6      6 -- 0.00031 0.00031 -- ~:0:<method 'uniform' of 'numpy.random.mtrand.RandomState' objects> (<method 'uniform' of 'numpy.random.mtrand.RandomState' objects>)
                <listcomp>                                   --      1      1 -- 0.00001 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:455:<listcomp> (<listcomp>)
                <listcomp>                                   --      1      1 -- 0.00000 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:460:<listcomp> (<listcomp>)
                _fit_stochastic                              --      1      1 -- 0.26838 10.36153 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:540:_fit_stochastic (_fit_stochastic)
                    clip                                     --      1      1 -- 0.00000 0.00017 -- <__array_function__ internals>:177:clip (clip)
                        _clip_dispatcher                     --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:2107:_clip_dispatcher (_clip_dispatcher)
                        <built-in method ..._array_function> --      1      1 -- 0.00000 0.00016 -- ~:0:<built-in method numpy.core._multiarray_umath.implement_array_function> (<built-in method numpy.core._multiarray_umath.implement_array_function>) +++
                    _backprop                                --   6700   6700 -- 0.56387 7.78020 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:278:_backprop (_backprop)
                        dot                                  --  20100  20100 -- 0.06823 0.28436 -- <__array_function__ internals>:177:dot (dot)
                            dot                              --  20100  20100 -- 0.01246 0.01246 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/multiarray.py:740:dot (dot)
                            <built-in metho...rray_function> --  20100  20100 -- 0.20367 0.20367 -- ~:0:<built-in method numpy.core._multiarray_umath.implement_array_function> (<built-in method numpy.core._multiarray_umath.implement_array_function>) +++
                        inplace_relu_derivative              --  13400  13400 -- 0.42397 0.42397 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_base.py:132:inplace_relu_derivative (inplace_relu_derivative)
                        squared_loss                         --   6700   6700 -- 0.21644 0.75569 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_base.py:158:squared_loss (squared_loss)
                            <method 'mean' ...rray' objects> --   6700   6700 -- 0.02714 0.53925 -- ~:0:<method 'mean' of 'numpy.ndarray' objects> (<method 'mean' of 'numpy.ndarray' objects>) +++
                        _forward_pass                        --   6700   6700 -- 0.49250 1.40606 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:156:_forward_pass (_forward_pass)
                            inplace_identity                 --   6700   6700 -- 0.00467 0.00467 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_base.py:13:inplace_identity (inplace_identity)
                            inplace_relu                     --  13400  13400 -- 0.24747 0.24747 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_base.py:47:inplace_relu (inplace_relu)
                            safe_sparse_dot                  --  20100  20100 -- 0.61913 0.66142 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/extmath.py:156:safe_sparse_dot (safe_sparse_dot) +++
                        _compute_loss_grad                   --  20100  20100 -- 1.13216 3.99297 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:214:_compute_loss_grad (_compute_loss_grad)
                            mean                             --  20100  20100 -- 0.07698 2.16640 -- <__array_function__ internals>:177:mean (mean)
                                _mean_dispatcher             --  20100  20100 -- 0.01363 0.01363 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:3340:_mean_dispatcher (_mean_dispatcher)
                                <built-in met...ay_function> --  20100  20100 -- 0.06673 2.07579 -- ~:0:<built-in method numpy.core._multiarray_umath.implement_array_function> (<built-in method numpy.core._multiarray_umath.implement_array_function>) +++
                            safe_sparse_dot                  --  20100  20100 -- 0.65156 0.69440 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/extmath.py:156:safe_sparse_dot (safe_sparse_dot) +++
                        safe_sparse_dot                      --  13400  13400 -- 0.29209 0.32024 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/extmath.py:156:safe_sparse_dot (safe_sparse_dot) +++
                        <method 'ravel' o...darray' objects> --  20100  20100 -- 0.03304 0.03304 -- ~:0:<method 'ravel' of 'numpy.ndarray' objects> (<method 'ravel' of 'numpy.ndarray' objects>)
                    _update_no_improvement_count             --    100    100 -- 0.00054 0.00054 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:694:_update_no_improvement_count (_update_no_improvement_count)
                    update_params                            --   6700   6700 -- 0.34336 1.88125 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_stochastic_optimizers.py:29:update_params (update_params)
                        <genexpr>                            --  46900  46900 -- 0.03107 0.03107 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_stochastic_optimizers.py:43:<genexpr> (<genexpr>)
                        _get_updates                         --   6700   6700 -- 0.06631 1.50682 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_stochastic_optimizers.py:169:_get_updates (_get_updates)
                            <listcomp>                       --   6700   6700 -- 1.44051 1.44051 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_stochastic_optimizers.py:183:<listcomp> (<listcomp>)
                    __init__                                 --      1      1 -- 0.00007 0.00035 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_stochastic_optimizers.py:121:__init__ (__init__)
                        __init__                             --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_stochastic_optimizers.py:25:__init__ (__init__)
                        <listcomp>                           --      1      1 -- 0.00002 0.00028 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_stochastic_optimizers.py:136:<listcomp> (<listcomp>)
                            zeros_like                       --      6      6 -- 0.00002 0.00025 -- <__array_function__ internals>:177:zeros_like (zeros_like)
                                _zeros_like_dispatcher       --      6      6 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/numeric.py:73:_zeros_like_dispatcher (_zeros_like_dispatcher)
                                <built-in met...ay_function> --      6      6 -- 0.00002 0.00023 -- ~:0:<built-in method numpy.core._multiarray_umath.implement_array_function> (<built-in method numpy.core._multiarray_umath.implement_array_function>) +++
                    iteration_ends                           --    100    100 -- 0.00098 0.00098 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_stochastic_optimizers.py:138:iteration_ends (iteration_ends)
                    _safe_indexing                           --   6700   6700 -- 0.05383 0.36439 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/__init__.py:285:_safe_indexing (_safe_indexing) +++
                    shuffle                                  --    100    100 -- 0.00094 0.03182 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/__init__.py:617:shuffle (shuffle)
                        resample                             --    100    100 -- 0.00238 0.03088 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/__init__.py:467:resample (resample)
                            <listcomp>                       --    100    100 -- 0.00033 0.00057 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/__init__.py:608:<listcomp> (<listcomp>)
                                isspmatrix                   --    100    100 -- 0.00012 0.00024 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/scipy/sparse/_base.py:1301:isspmatrix (isspmatrix) +++
                            <listcomp>                       --    100    100 -- 0.00032 0.00491 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/__init__.py:609:<listcomp> (<listcomp>)
                                _safe_indexing               --    100    100 -- 0.00078 0.00459 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/__init__.py:285:_safe_indexing (_safe_indexing) +++
                            check_consistent_length          --    100    100 -- 0.00092 0.01369 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:383:check_consistent_length (check_consistent_length) +++
                            check_random_state               --    100    100 -- 0.00059 0.00182 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:1197:check_random_state (check_random_state) +++
                            <method 'shuffl...tate' objects> --    100    100 -- 0.00582 0.00582 -- ~:0:<method 'shuffle' of 'numpy.random.mtrand.RandomState' objects> (<method 'shuffle' of 'numpy.random.mtrand.RandomState' objects>)
                            <built-in method numpy.arange>   --    100    100 -- 0.00142 0.00142 -- ~:0:<built-in method numpy.arange> (<built-in method numpy.arange>) +++
                            <built-in metho...ltins.hasattr> --    100    100 -- 0.00015 0.00015 -- ~:0:<built-in method builtins.hasattr> (<built-in method builtins.hasattr>) +++
                            <built-in method builtins.len>   --    200    200 -- 0.00013 0.00013 -- ~:0:<built-in method builtins.len> (<built-in method builtins.len>) +++
                    gen_batches                              --   6800   6800 -- 0.03184 0.03243 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/__init__.py:728:gen_batches (gen_batches)
                        <built-in method ...tins.isinstance> --    100    100 -- 0.00024 0.00060 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
                    <method 'append' of 'list' objects>      --    100    100 -- 0.00010 0.00010 -- ~:0:<method 'append' of 'list' objects> (<method 'append' of 'list' objects>) +++
                    <built-in method _warnings.warn>         --      1      1 -- 0.00006 0.00093 -- ~:0:<built-in method _warnings.warn> (<built-in method _warnings.warn>)
                        _showwarnmsg                         --      1      1 -- 0.00001 0.00086 -- /usr/local/lib/python3.9/warnings.py:96:_showwarnmsg (_showwarnmsg)
                            _showwarning                     --      1      1 -- 0.00001 0.00085 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx_gallery/gen_rst.py:557:_showwarning (_showwarning)
                                formatwarning                --      1      1 -- 0.00001 0.00005 -- /usr/local/lib/python3.9/warnings.py:15:formatwarning (formatwarning)
                                    _formatwarnmsg_impl      --      1      1 -- 0.00003 0.00004 -- /usr/local/lib/python3.9/warnings.py:35:_formatwarnmsg_impl (_formatwarnmsg_impl)
                                        getline              --      1      1 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/linecache.py:26:getline (getline)
                                            getlines         --      1      1 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/linecache.py:36:getlines (getlines)
                                    __init__                 --      1      1 -- 0.00000 0.00000 -- /usr/local/lib/python3.9/warnings.py:403:__init__ (__init__) +++
                                write                        --      1      1 -- 0.00002 0.00079 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx_gallery/gen_rst.py:83:write (write) +++
                        __init__                             --      1      1 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/warnings.py:403:__init__ (__init__) +++
                _validate_input                              --      1      1 -- 0.00002 0.00107 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:1582:_validate_input (_validate_input)
                    _validate_data                           --      1      1 -- 0.00002 0.00105 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/base.py:453:_validate_data (_validate_data)
                        _check_n_features                    --      1      1 -- 0.00000 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/base.py:318:_check_n_features (_check_n_features)
                            _num_features                    --      1      1 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:267:_num_features (_num_features)
                        _check_feature_names                 --      1      1 -- 0.00000 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/base.py:364:_check_feature_names (_check_feature_names)
                            _get_feature_names               --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:1860:_get_feature_names (_get_feature_names)
                        check_X_y                            --      1      1 -- 0.00001 0.00099 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:979:check_X_y (check_X_y)
                            check_consistent_length          --      1      1 -- 0.00001 0.00017 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:383:check_consistent_length (check_consistent_length) +++
                            check_array                      --      1      1 -- 0.00005 0.00050 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:629:check_array (check_array) +++
                            _check_y                         --      1      1 -- 0.00001 0.00031 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:1127:_check_y (_check_y)
                                check_array                  --      1      1 -- 0.00004 0.00031 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:629:check_array (check_array) +++
                check_random_state                           --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:1197:check_random_state (check_random_state) +++
                <built-in method builtins.all>               --      1      1 -- 0.00001 0.00023 -- ~:0:<built-in method builtins.all> (<built-in method builtins.all>)
                    <genexpr>                                --      7      7 -- 0.00009 0.00022 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:485:<genexpr> (<genexpr>)
                        <method 'all' of ...darray' objects> --      6      6 -- 0.00002 0.00013 -- ~:0:<method 'all' of 'numpy.ndarray' objects> (<method 'all' of 'numpy.ndarray' objects>)
                            _all                             --      6      6 -- 0.00001 0.00011 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_methods.py:61:_all (_all)
                                <method 'redu...nc' objects> --      6      6 -- 0.00010 0.00010 -- ~:0:<method 'reduce' of 'numpy.ufunc' objects> (<method 'reduce' of 'numpy.ufunc' objects>) +++
        <built-in method builtins.print>                     --      3      3 -- 0.00003 0.00186 -- ~:0:<built-in method builtins.print> (<built-in method builtins.print>)
            write                                            --      6      6 -- 0.00008 0.00183 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx_gallery/gen_rst.py:83:write (write) +++
_mean                                                        --  26900  26900 -- 0.95049 2.39535 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_methods.py:164:_mean (_mean)
    __enter__                                                --  20100  20100 -- 0.05025 0.15076 -- /usr/local/lib/python3.9/contextlib.py:112:__enter__ (__enter__)
        <built-in method builtins.next>                      --  20100  20100 -- 0.01778 0.10050 -- ~:0:<built-in method builtins.next> (<built-in method builtins.next>) +++
    __exit__                                                 --  20100  20100 -- 0.09070 0.20655 -- /usr/local/lib/python3.9/contextlib.py:121:__exit__ (__exit__)
        <built-in method builtins.next>                      --  20100  20100 -- 0.03260 0.11584 -- ~:0:<built-in method builtins.next> (<built-in method builtins.next>) +++
    helper                                                   --  20100  20100 -- 0.06628 0.18628 -- /usr/local/lib/python3.9/contextlib.py:242:helper (helper)
        __init__                                             --  20100  20100 -- 0.10235 0.12000 -- /usr/local/lib/python3.9/contextlib.py:86:__init__ (__init__)
            <built-in method builtins.getattr>               --  20100  20100 -- 0.01765 0.01765 -- ~:0:<built-in method builtins.getattr> (<built-in method builtins.getattr>) +++
    _count_reduce_items                                      --  26900  26900 -- 0.31184 0.36172 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_methods.py:67:_count_reduce_items (_count_reduce_items)
        <built-in method numpy.co...th.normalize_axis_index> --  33800  33800 -- 0.03130 0.03130 -- ~:0:<built-in method numpy.core._multiarray_umath.normalize_axis_index> (<built-in method numpy.core._multiarray_umath.normalize_axis_index>)
        <built-in method builtins.isinstance>                --  20100  20100 -- 0.01858 0.01858 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
    <built-in method numpy.asanyarray>                       --  26900  26900 -- 0.01303 0.01303 -- ~:0:<built-in method numpy.asanyarray> (<built-in method numpy.asanyarray>) +++
    <method 'reduce' of 'numpy.ufunc' objects>               --  26900  26900 -- 0.46601 0.46601 -- ~:0:<method 'reduce' of 'numpy.ufunc' objects> (<method 'reduce' of 'numpy.ufunc' objects>) +++
    <built-in method builtins.hasattr>                       --   6800   6800 -- 0.00926 0.00926 -- ~:0:<built-in method builtins.hasattr> (<built-in method builtins.hasattr>) +++
    <built-in method builtins.isinstance>                    --  26900  26900 -- 0.01884 0.01884 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
    <built-in method builtins.issubclass>                    --  53800  53800 -- 0.03242 0.03242 -- ~:0:<built-in method builtins.issubclass> (<built-in method builtins.issubclass>)
seterr                                                       --      4      4 -- 0.00004 0.00008 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_ufunc_config.py:33:seterr (seterr)
    geterr                                                   --      4      4 -- 0.00002 0.00003 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_ufunc_config.py:132:geterr (geterr)
_wrapreduction                                               --      3      3 -- 0.00003 0.00021 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:69:_wrapreduction (_wrapreduction)
    <dictcomp>                                               --      3      3 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:70:<dictcomp> (<dictcomp>)
    <method 'reduce' of 'numpy.ufunc' objects>               --      3      3 -- 0.00017 0.00017 -- ~:0:<method 'reduce' of 'numpy.ufunc' objects> (<method 'reduce' of 'numpy.ufunc' objects>) +++
isspmatrix                                                   --  60502  60502 -- 0.06886 0.12383 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/scipy/sparse/_base.py:1301:isspmatrix (isspmatrix)
    <built-in method builtins.isinstance>                    --  60502  60502 -- 0.05497 0.05497 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
get_config                                                   --      6      6 -- 0.00002 0.00004 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/_config.py:30:get_config (get_config)
    _get_threadlocal_config                                  --      6      6 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/_config.py:22:_get_threadlocal_config (_get_threadlocal_config)
_safe_indexing                                               --   6800   6800 -- 0.05461 0.36898 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/__init__.py:285:_safe_indexing (_safe_indexing)
    _array_indexing                                          --   6800   6800 -- 0.16856 0.18157 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/__init__.py:179:_array_indexing (_array_indexing)
        isspmatrix                                           --   6800   6800 -- 0.00575 0.01030 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/scipy/sparse/_base.py:1301:isspmatrix (isspmatrix) +++
        <built-in method builtins.isinstance>                --   6800   6800 -- 0.00271 0.00271 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
    _determine_key_type                                      --   6800   6800 -- 0.09243 0.11986 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/__init__.py:215:_determine_key_type (_determine_key_type)
        <method 'keys' of 'dict' objects>                    --   6800   6800 -- 0.00596 0.00596 -- ~:0:<method 'keys' of 'dict' objects> (<method 'keys' of 'dict' objects>)
        <built-in method builtins.hasattr>                   --   6800   6800 -- 0.00385 0.00385 -- ~:0:<built-in method builtins.hasattr> (<built-in method builtins.hasattr>) +++
        <built-in method builtins.isinstance>                --  20400  20400 -- 0.01762 0.01762 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
    <built-in method builtins.hasattr>                       --  13600  13600 -- 0.01294 0.01294 -- ~:0:<built-in method builtins.hasattr> (<built-in method builtins.hasattr>) +++
__getattr__                                                  --      6      6 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_array_api.py:63:__getattr__ (__getattr__)
asarray                                                      --      4      4 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_array_api.py:70:asarray (asarray)
get_namespace                                                --      4      4 -- 0.00001 0.00005 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_array_api.py:90:get_namespace (get_namespace)
    get_config                                               --      4      4 -- 0.00002 0.00003 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/_config.py:30:get_config (get_config) +++
validate_parameter_constraints                               --      1      3 -- 0.00020 0.00199 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:28:validate_parameter_constraints (validate_parameter_constraints)
    <listcomp>                                               --     23     31 -- 0.00006 0.00130 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:74:<listcomp> (<listcomp>)
        make_constraint                                      --     26     42 -- 0.00015 0.00126 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:103:make_constraint (make_constraint)
            __init__                                         --      5      5 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:226:__init__ (__init__) +++
            __init__                                         --     10     10 -- 0.00003 0.00004 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:258:__init__ (__init__) +++
            __init__                                         --      1      1 -- 0.00002 0.00050 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:505:__init__ (__init__)
                wrapper                                      --      1      1 -- 0.00003 0.00048 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:169:wrapper (wrapper) +++
                __init__                                     --      2      2 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:226:__init__ (__init__) +++
                __init__                                     --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:258:__init__ (__init__) +++
            __init__                                         --      4      4 -- 0.00004 0.00009 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:530:__init__ (__init__)
                __init__                                     --      4      4 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:226:__init__ (__init__) +++
                __init__                                     --     12     12 -- 0.00003 0.00004 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:258:__init__ (__init__) +++
            __init__                                         --      1      1 -- 0.00002 0.00044 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:563:__init__ (__init__)
                wrapper                                      --      1      1 -- 0.00003 0.00042 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:169:wrapper (wrapper) +++
                __init__                                     --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:226:__init__ (__init__) +++
                __init__                                     --      2      2 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:258:__init__ (__init__) +++
            <built-in method builtins.isinstance>            --    192    192 -- 0.00012 0.00017 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
    is_satisfied_by                                          --      7      7 -- 0.00001 0.00004 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:262:is_satisfied_by (is_satisfied_by) +++
    is_satisfied_by                                          --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:272:is_satisfied_by (is_satisfied_by) +++
    is_satisfied_by                                          --      6      6 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:328:is_satisfied_by (is_satisfied_by)
    is_satisfied_by                                          --     13     13 -- 0.00003 0.00038 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:450:is_satisfied_by (is_satisfied_by) +++
    is_satisfied_by                                          --      1      1 -- 0.00000 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:471:is_satisfied_by (is_satisfied_by)
        _is_arraylike_not_scalar                             --      1      1 -- 0.00001 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:262:_is_arraylike_not_scalar (_is_arraylike_not_scalar)
            isscalar                                         --      1      1 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/numeric.py:1878:isscalar (isscalar)
            _is_arraylike                                    --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:257:_is_arraylike (_is_arraylike)
    is_satisfied_by                                          --      1      1 -- 0.00001 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:513:is_satisfied_by (is_satisfied_by)
        <genexpr>                                            --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:514:<genexpr> (<genexpr>) +++
    is_satisfied_by                                          --      4      4 -- 0.00003 0.00007 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:538:is_satisfied_by (is_satisfied_by)
        <genexpr>                                            --      4      4 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:547:<genexpr> (<genexpr>) +++
    is_satisfied_by                                          --      1      1 -- 0.00001 0.00003 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:571:is_satisfied_by (is_satisfied_by)
        <genexpr>                                            --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:572:<genexpr> (<genexpr>) +++
wrapper                                                      --      2      2 -- 0.00006 0.00089 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:169:wrapper (wrapper)
    apply_defaults                                           --      2      2 -- 0.00003 0.00004 -- /usr/local/lib/python3.9/inspect.py:2718:apply_defaults (apply_defaults)
        parameters                                           --      2      2 -- 0.00000 0.00000 -- /usr/local/lib/python3.9/inspect.py:2882:parameters (parameters) +++
    parameters                                               --      2      2 -- 0.00000 0.00000 -- /usr/local/lib/python3.9/inspect.py:2882:parameters (parameters) +++
    bind                                                     --      2      2 -- 0.00001 0.00013 -- /usr/local/lib/python3.9/inspect.py:3057:bind (bind)
        _bind                                                --      2      2 -- 0.00009 0.00012 -- /usr/local/lib/python3.9/inspect.py:2926:_bind (_bind)
            name                                             --     20     20 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/inspect.py:2565:name (name) +++
            kind                                             --     26     26 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/inspect.py:2577:kind (kind) +++
            __init__                                         --      2      2 -- 0.00000 0.00000 -- /usr/local/lib/python3.9/inspect.py:2657:__init__ (__init__)
            parameters                                       --      2      2 -- 0.00000 0.00000 -- /usr/local/lib/python3.9/inspect.py:2882:parameters (parameters) +++
            <built-in method builtins.next>                  --     20     20 -- 0.00001 0.00001 -- ~:0:<built-in method builtins.next> (<built-in method builtins.next>) +++
    signature                                                --      2      2 -- 0.00000 0.00033 -- /usr/local/lib/python3.9/inspect.py:3128:signature (signature) +++
    validate_parameter_constraints                           --      2      2 -- 0.00005 0.00026 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:28:validate_parameter_constraints (validate_parameter_constraints) +++
    <listcomp>                                               --      2      2 -- 0.00002 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:179:<listcomp> (<listcomp>)
        kind                                                 --     10     10 -- 0.00000 0.00000 -- /usr/local/lib/python3.9/inspect.py:2577:kind (kind) +++
    <dictcomp>                                               --      2      2 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:185:<dictcomp> (<dictcomp>)
    __init__                                                 --      2      2 -- 0.00001 0.00004 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:395:__init__ (__init__)
        __init__                                             --      2      2 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:226:__init__ (__init__) +++
        _check_params                                        --      2      2 -- 0.00001 0.00003 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:412:_check_params (_check_params)
__init__                                                     --     39     39 -- 0.00004 0.00004 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:226:__init__ (__init__)
__init__                                                     --     25     25 -- 0.00007 0.00010 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:258:__init__ (__init__)
    __init__                                                 --     25     25 -- 0.00003 0.00003 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:226:__init__ (__init__) +++
is_satisfied_by                                              --     12     12 -- 0.00001 0.00005 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:262:is_satisfied_by (is_satisfied_by)
    <built-in method builtins.isinstance>                    --     12     12 -- 0.00001 0.00004 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
is_satisfied_by                                              --      2      2 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:272:is_satisfied_by (is_satisfied_by)
is_satisfied_by                                              --     15     15 -- 0.00003 0.00041 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:450:is_satisfied_by (is_satisfied_by)
    __contains__                                             --     14     14 -- 0.00024 0.00026 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:434:__contains__ (__contains__)
        <built-in method _operator.lt>                       --     12     12 -- 0.00001 0.00001 -- ~:0:<built-in method _operator.lt> (<built-in method _operator.lt>)
        <built-in method _operator.ge>                       --     13     13 -- 0.00001 0.00001 -- ~:0:<built-in method _operator.ge> (<built-in method _operator.ge>)
    <built-in method builtins.isinstance>                    --     15     15 -- 0.00003 0.00012 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
<genexpr>                                                    --      4      4 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:514:<genexpr> (<genexpr>)
    is_satisfied_by                                          --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:262:is_satisfied_by (is_satisfied_by) +++
    is_satisfied_by                                          --      1      1 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:272:is_satisfied_by (is_satisfied_by) +++
    is_satisfied_by                                          --      1      1 -- 0.00000 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:450:is_satisfied_by (is_satisfied_by) +++
<genexpr>                                                    --      8      8 -- 0.00001 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:547:<genexpr> (<genexpr>)
    is_satisfied_by                                          --      4      4 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:262:is_satisfied_by (is_satisfied_by) +++
<genexpr>                                                    --      2      2 -- 0.00000 0.00003 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:572:<genexpr> (<genexpr>)
    is_satisfied_by                                          --      1      1 -- 0.00000 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_param_validation.py:450:is_satisfied_by (is_satisfied_by) +++
safe_sparse_dot                                              --  53600  53600 -- 1.56278 1.67607 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/extmath.py:156:safe_sparse_dot (safe_sparse_dot)
    isspmatrix                                               --  53600  53600 -- 0.06299 0.11329 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/scipy/sparse/_base.py:1301:isspmatrix (isspmatrix) +++
_num_samples                                                 --    104    104 -- 0.00225 0.00396 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:320:_num_samples (_num_samples)
    <built-in method builtins.hasattr>                       --    312    312 -- 0.00036 0.00036 -- ~:0:<built-in method builtins.hasattr> (<built-in method builtins.hasattr>) +++
    <built-in method builtins.isinstance>                    --    104    104 -- 0.00022 0.00131 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
    <built-in method builtins.len>                           --    104    104 -- 0.00005 0.00005 -- ~:0:<built-in method builtins.len> (<built-in method builtins.len>) +++
check_consistent_length                                      --    101    101 -- 0.00092 0.01386 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:383:check_consistent_length (check_consistent_length)
    unique                                                   --    101    101 -- 0.00051 0.00869 -- <__array_function__ internals>:177:unique (unique)
        _unique_dispatcher                                   --    101    101 -- 0.00007 0.00007 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/lib/arraysetops.py:133:_unique_dispatcher (_unique_dispatcher)
        <built-in method numpy.co...mplement_array_function> --    101    101 -- 0.00067 0.00812 -- ~:0:<built-in method numpy.core._multiarray_umath.implement_array_function> (<built-in method numpy.core._multiarray_umath.implement_array_function>) +++
    <listcomp>                                               --    101    101 -- 0.00029 0.00419 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:394:<listcomp> (<listcomp>)
        _num_samples                                         --    102    102 -- 0.00222 0.00390 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:320:_num_samples (_num_samples) +++
    <built-in method builtins.len>                           --    101    101 -- 0.00005 0.00005 -- ~:0:<built-in method builtins.len> (<built-in method builtins.len>) +++
check_array                                                  --      2      2 -- 0.00009 0.00081 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:629:check_array (check_array)
    simplefilter                                             --      2      2 -- 0.00001 0.00005 -- /usr/local/lib/python3.9/warnings.py:165:simplefilter (simplefilter)
        _add_filter                                          --      2      2 -- 0.00003 0.00004 -- /usr/local/lib/python3.9/warnings.py:181:_add_filter (_add_filter)
    __init__                                                 --      2      2 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/warnings.py:437:__init__ (__init__)
    __enter__                                                --      2      2 -- 0.00002 0.00003 -- /usr/local/lib/python3.9/warnings.py:458:__enter__ (__enter__)
    __exit__                                                 --      2      2 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/warnings.py:477:__exit__ (__exit__)
    isspmatrix                                               --      2      2 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/scipy/sparse/_base.py:1301:isspmatrix (isspmatrix) +++
    get_namespace                                            --      2      2 -- 0.00001 0.00003 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_array_api.py:90:get_namespace (get_namespace) +++
    _asarray_with_order                                      --      2      2 -- 0.00002 0.00004 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_array_api.py:168:_asarray_with_order (_asarray_with_order)
        __getattr__                                          --      2      2 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_array_api.py:63:__getattr__ (__getattr__) +++
        asarray                                              --      2      2 -- 0.00000 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_array_api.py:70:asarray (asarray) +++
    _assert_all_finite                                       --      2      2 -- 0.00011 0.00045 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:96:_assert_all_finite (_assert_all_finite)
        sum                                                  --      2      2 -- 0.00001 0.00020 -- <__array_function__ internals>:177:sum (sum)
            _sum_dispatcher                                  --      2      2 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:2183:_sum_dispatcher (_sum_dispatcher)
            <built-in method numpy....lement_array_function> --      2      2 -- 0.00001 0.00019 -- ~:0:<built-in method numpy.core._multiarray_umath.implement_array_function> (<built-in method numpy.core._multiarray_umath.implement_array_function>) +++
        __init__                                             --      2      2 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_ufunc_config.py:426:__init__ (__init__)
        __enter__                                            --      2      2 -- 0.00001 0.00006 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_ufunc_config.py:430:__enter__ (__enter__)
            seterr                                           --      2      2 -- 0.00002 0.00005 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_ufunc_config.py:33:seterr (seterr) +++
        __exit__                                             --      2      2 -- 0.00001 0.00004 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_ufunc_config.py:435:__exit__ (__exit__)
            seterr                                           --      2      2 -- 0.00001 0.00003 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_ufunc_config.py:33:seterr (seterr) +++
        get_config                                           --      2      2 -- 0.00000 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/_config.py:30:get_config (get_config) +++
        __getattr__                                          --      4      4 -- 0.00000 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_array_api.py:63:__getattr__ (__getattr__) +++
        asarray                                              --      2      2 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_array_api.py:70:asarray (asarray) +++
        get_namespace                                        --      2      2 -- 0.00000 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/_array_api.py:90:get_namespace (get_namespace) +++
    _num_samples                                             --      2      2 -- 0.00003 0.00007 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:320:_num_samples (_num_samples) +++
    _ensure_no_complex_data                                  --      2      2 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:571:_ensure_no_complex_data (_ensure_no_complex_data)
    _check_estimator_name                                    --      2      2 -- 0.00000 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:581:_check_estimator_name (_check_estimator_name)
check_random_state                                           --    101    101 -- 0.00059 0.00182 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/utils/validation.py:1197:check_random_state (check_random_state)
    <built-in method builtins.isinstance>                    --    200    200 -- 0.00045 0.00123 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>) +++
write                                                        --      7      7 -- 0.00010 0.00262 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx_gallery/gen_rst.py:83:write (write)
    verbose                                                  --      6      6 -- 0.00004 0.00250 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/logging.py:128:verbose (verbose)
        log                                                  --      6      6 -- 0.00006 0.00246 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/logging.py:121:log (log)
            log                                              --      6      6 -- 0.00007 0.00239 -- /usr/local/lib/python3.9/logging/__init__.py:1825:log (log)
                log                                          --      6      6 -- 0.00006 0.00224 -- /usr/local/lib/python3.9/logging/__init__.py:1485:log (log)
                    _log                                     --      6      6 -- 0.00004 0.00217 -- /usr/local/lib/python3.9/logging/__init__.py:1553:_log (_log)
                        findCaller                           --      6      6 -- 0.00008 0.00014 -- /usr/local/lib/python3.9/logging/__init__.py:1502:findCaller (findCaller)
                            <lambda>                         --      6      6 -- 0.00002 0.00002 -- /usr/local/lib/python3.9/logging/__init__.py:156:<lambda> (<lambda>)
                            normcase                         --     12     12 -- 0.00002 0.00003 -- /usr/local/lib/python3.9/posixpath.py:52:normcase (normcase)
                                <built-in met...osix.fspath> --     12     12 -- 0.00001 0.00001 -- ~:0:<built-in method posix.fspath> (<built-in method posix.fspath>) +++
                            <built-in metho...ltins.hasattr> --     12     12 -- 0.00001 0.00001 -- ~:0:<built-in method builtins.hasattr> (<built-in method builtins.hasattr>) +++
                        makeRecord                           --      6      6 -- 0.00005 0.00065 -- /usr/local/lib/python3.9/logging/__init__.py:1538:makeRecord (makeRecord)
                            __init__                         --      6      6 -- 0.00026 0.00060 -- /usr/local/lib/python3.9/logging/__init__.py:278:__init__ (__init__)
                                getLevelName                 --      6      6 -- 0.00004 0.00005 -- /usr/local/lib/python3.9/logging/__init__.py:119:getLevelName (getLevelName)
                                    <method 'ge...' objects> --     12     12 -- 0.00001 0.00001 -- ~:0:<method 'get' of 'dict' objects> (<method 'get' of 'dict' objects>) +++
                                current_process              --      6      6 -- 0.00000 0.00000 -- /usr/local/lib/python3.9/multiprocessing/process.py:37:current_process (current_process)
                                name                         --      6      6 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/multiprocessing/process.py:189:name (name)
                                splitext                     --      6      6 -- 0.00003 0.00008 -- /usr/local/lib/python3.9/posixpath.py:117:splitext (splitext)
                                    _splitext                --      6      6 -- 0.00003 0.00005 -- /usr/local/lib/python3.9/genericpath.py:121:_splitext (_splitext)
                                        <method '...objects> --     12     12 -- 0.00001 0.00001 -- ~:0:<method 'rfind' of 'str' objects> (<method 'rfind' of 'str' objects>) +++
                                basename                     --      6      6 -- 0.00004 0.00007 -- /usr/local/lib/python3.9/posixpath.py:140:basename (basename)
                                    _get_sep                 --      6      6 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/posixpath.py:41:_get_sep (_get_sep)
                                name                         --      6      6 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/threading.py:1053:name (name)
                                current_thread               --      6      6 -- 0.00002 0.00002 -- /usr/local/lib/python3.9/threading.py:1318:current_thread (current_thread)
                        handle                               --      6      6 -- 0.00002 0.00134 -- /usr/local/lib/python3.9/logging/__init__.py:1579:handle (handle)
                            filter                           --      6      6 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/logging/__init__.py:787:filter (filter) +++
                            callHandlers                     --      6      6 -- 0.00006 0.00131 -- /usr/local/lib/python3.9/logging/__init__.py:1633:callHandlers (callHandlers)
                                handle                       --     12     12 -- 0.00006 0.00126 -- /usr/local/lib/python3.9/logging/__init__.py:935:handle (handle)
                                    filter                   --     12     12 -- 0.00005 0.00014 -- /usr/local/lib/python3.9/logging/__init__.py:787:filter (filter) +++
                                    acquire                  --     12     12 -- 0.00003 0.00005 -- /usr/local/lib/python3.9/logging/__init__.py:892:acquire (acquire) +++
                                    release                  --     12     12 -- 0.00001 0.00002 -- /usr/local/lib/python3.9/logging/__init__.py:899:release (release) +++
                                    emit                     --      6      6 -- 0.00003 0.00031 -- /usr/local/lib/python3.9/logging/__init__.py:1067:emit (emit) +++
                                    emit                     --      6      6 -- 0.00005 0.00068 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/logging.py:151:emit (emit)
                                        acquire              --      6      6 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/logging/__init__.py:892:acquire (acquire) +++
                                        release              --      6      6 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/logging/__init__.py:899:release (release) +++
                                        emit                 --      6      6 -- 0.00004 0.00060 -- /usr/local/lib/python3.9/logging/__init__.py:1067:emit (emit) +++
                    isEnabledFor                             --      6      6 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/logging/__init__.py:1677:isEnabledFor (isEnabledFor) +++
                isEnabledFor                                 --      6      6 -- 0.00001 0.00003 -- /usr/local/lib/python3.9/logging/__init__.py:1834:isEnabledFor (isEnabledFor)
                    isEnabledFor                             --      6      6 -- 0.00001 0.00001 -- /usr/local/lib/python3.9/logging/__init__.py:1677:isEnabledFor (isEnabledFor) +++
                process                                      --      6      6 -- 0.00004 0.00005 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sphinx/util/logging.py:131:process (process)
get_state                                                    --      2      2 -- 0.00027 0.00027 -- onnxruntime/capi/training/training_session.py:52:get_state (get_state)
numpy_to_ort_value                                           --    102    102 -- 0.00054 0.00234 -- onnxruntime_helper.py:133:numpy_to_ort_value (numpy_to_ort_value)
    <built-in method onnxruntim...state.ortvalue_from_numpy> --    102    102 -- 0.00180 0.00180 -- ~:0:<built-in method onnxruntime.capi.onnxruntime_pybind11_state.ortvalue_from_numpy> (<built-in method onnxruntime.capi.onnxruntime_pybind11_state.ortvalue_from_numpy>)
<built-in method builtins.len>                               --  14330  14330 -- 0.02493 0.04475 -- ~:0:<built-in method builtins.len> (<built-in method builtins.len>)
    __len__                                                  --  13600  13600 -- 0.01983 0.01983 -- onnxcustom/onnxcustom_UT_39_std/_doc/sphinxdoc/source/onnxcustom/training/data_loader.py:94:__len__ (__len__)
<method 'astype' of 'numpy.ndarray' objects>                 --     12     12 -- 0.00010 0.00010 -- ~:0:<method 'astype' of 'numpy.ndarray' objects> (<method 'astype' of 'numpy.ndarray' objects>)
<built-in method numpy.array>                                --    201    201 -- 0.01305 0.01305 -- ~:0:<built-in method numpy.array> (<built-in method numpy.array>)
<method 'append' of 'list' objects>                          --   6950   6950 -- 0.00668 0.00668 -- ~:0:<method 'append' of 'list' objects> (<method 'append' of 'list' objects>)
<method 'mean' of 'numpy.ndarray' objects>                   --   6800   6800 -- 0.02775 0.55100 -- ~:0:<method 'mean' of 'numpy.ndarray' objects> (<method 'mean' of 'numpy.ndarray' objects>)
    _mean                                                    --   6800   6800 -- 0.24623 0.52326 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_methods.py:164:_mean (_mean) +++
<built-in method builtins.hasattr>                           --  27697  27697 -- 0.02664 0.02664 -- ~:0:<built-in method builtins.hasattr> (<built-in method builtins.hasattr>)
<built-in method builtins.isinstance>                        --  135660  135660 -- 0.11396 0.11644 -- ~:0:<built-in method builtins.isinstance> (<built-in method builtins.isinstance>)
    __instancecheck__                                        --    367    367 -- 0.00038 0.00247 -- /usr/local/lib/python3.9/abc.py:96:__instancecheck__ (__instancecheck__)
        <built-in method _abc._abc_instancecheck>            --    367    367 -- 0.00151 0.00210 -- ~:0:<built-in method _abc._abc_instancecheck> (<built-in method _abc._abc_instancecheck>)
            __subclasscheck__                                --    121    121 -- 0.00016 0.00058 -- /usr/local/lib/python3.9/abc.py:100:__subclasscheck__ (__subclasscheck__)
                <built-in method _abc._abc_subclasscheck>    --    121    121 -- 0.00043 0.00043 -- ~:0:<built-in method _abc._abc_subclasscheck> (<built-in method _abc._abc_subclasscheck>)
<built-in method numpy.empty>                                --    107    107 -- 0.00048 0.00048 -- ~:0:<built-in method numpy.empty> (<built-in method numpy.empty>)
<built-in method numpy.arange>                               --    101    101 -- 0.00144 0.00144 -- ~:0:<built-in method numpy.arange> (<built-in method numpy.arange>)
<built-in method numpy.core._...th.implement_array_function> --  40311  40325 -- 0.27119 2.28823 -- ~:0:<built-in method numpy.core._multiarray_umath.implement_array_function> (<built-in method numpy.core._multiarray_umath.implement_array_function>)
    clip                                                     --      1      1 -- 0.00001 0.00016 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:2111:clip (clip)
        _wrapfunc                                            --      1      1 -- 0.00001 0.00015 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:51:_wrapfunc (_wrapfunc)
            _wrapit                                          --      1      1 -- 0.00002 0.00014 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:38:_wrapit (_wrapit)
                <method 'clip' of 'numpy.ndarray' objects>   --      1      1 -- 0.00001 0.00012 -- ~:0:<method 'clip' of 'numpy.ndarray' objects> (<method 'clip' of 'numpy.ndarray' objects>)
                    _clip                                    --      1      1 -- 0.00001 0.00012 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_methods.py:127:_clip (_clip)
                        _clip_dep_is_scalar_nan              --      2      2 -- 0.00005 0.00008 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_methods.py:93:_clip_dep_is_scalar_nan (_clip_dep_is_scalar_nan)
                            ndim                             --      2      2 -- 0.00001 0.00003 -- <__array_function__ internals>:177:ndim (ndim)
                                _ndim_dispatcher             --      2      2 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:3148:_ndim_dispatcher (_ndim_dispatcher)
                        _clip_dep_is_byte_swapped            --      2      2 -- 0.00000 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_methods.py:103:_clip_dep_is_byte_swapped (_clip_dep_is_byte_swapped)
                        _clip_dep_invoke_with_casting        --      1      1 -- 0.00001 0.00001 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_methods.py:108:_clip_dep_invoke_with_casting (_clip_dep_invoke_with_casting)
    sum                                                      --      2      2 -- 0.00001 0.00018 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:2188:sum (sum)
        _wrapreduction                                       --      2      2 -- 0.00002 0.00016 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:69:_wrapreduction (_wrapreduction) +++
    any                                                      --      1      1 -- 0.00001 0.00006 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:2333:any (any)
        _wrapreduction                                       --      1      1 -- 0.00001 0.00005 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:69:_wrapreduction (_wrapreduction) +++
    ndim                                                     --      2      2 -- 0.00001 0.00002 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:3152:ndim (ndim)
    mean                                                     --  20100  20100 -- 0.13697 2.00907 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/fromnumeric.py:3345:mean (mean)
        _mean                                                --  20100  20100 -- 0.70426 1.87210 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_methods.py:164:_mean (_mean) +++
    zeros_like                                               --      6      6 -- 0.00005 0.00021 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/numeric.py:77:zeros_like (zeros_like)
        empty_like                                           --      6      6 -- 0.00003 0.00007 -- <__array_function__ internals>:177:empty_like (empty_like)
            empty_like                                       --      6      6 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/multiarray.py:84:empty_like (empty_like)
        copyto                                               --      6      6 -- 0.00003 0.00007 -- <__array_function__ internals>:177:copyto (copyto)
            copyto                                           --      6      6 -- 0.00000 0.00000 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/multiarray.py:1079:copyto (copyto)
    unique                                                   --    101    101 -- 0.00081 0.00745 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/lib/arraysetops.py:138:unique (unique)
        _unpack_tuple                                        --    101    101 -- 0.00020 0.00025 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/lib/arraysetops.py:125:_unpack_tuple (_unpack_tuple)
            <built-in method builtins.len>                   --    101    101 -- 0.00005 0.00005 -- ~:0:<built-in method builtins.len> (<built-in method builtins.len>) +++
        _unique1d                                            --    101    101 -- 0.00433 0.00564 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/lib/arraysetops.py:323:_unique1d (_unique1d)
            <method 'flatten' of 'numpy.ndarray' objects>    --    101    101 -- 0.00064 0.00064 -- ~:0:<method 'flatten' of 'numpy.ndarray' objects> (<method 'flatten' of 'numpy.ndarray' objects>)
            <method 'sort' of 'numpy.ndarray' objects>       --    101    101 -- 0.00018 0.00018 -- ~:0:<method 'sort' of 'numpy.ndarray' objects> (<method 'sort' of 'numpy.ndarray' objects>)
            <built-in method numpy.asanyarray>               --    101    101 -- 0.00003 0.00003 -- ~:0:<built-in method numpy.asanyarray> (<built-in method numpy.asanyarray>) +++
            <built-in method numpy.empty>                    --    101    101 -- 0.00046 0.00046 -- ~:0:<built-in method numpy.empty> (<built-in method numpy.empty>) +++
        <built-in method numpy.asanyarray>                   --    101    101 -- 0.00075 0.00075 -- ~:0:<built-in method numpy.asanyarray> (<built-in method numpy.asanyarray>) +++
<built-in method builtins.getattr>                           --  20174  20174 -- 0.01770 0.01770 -- ~:0:<built-in method builtins.getattr> (<built-in method builtins.getattr>)
<built-in method numpy.asanyarray>                           --  27102  27102 -- 0.01380 0.01380 -- ~:0:<built-in method numpy.asanyarray> (<built-in method numpy.asanyarray>)
<method 'reduce' of 'numpy.ufunc' objects>                   --  26909  26909 -- 0.46628 0.46628 -- ~:0:<method 'reduce' of 'numpy.ufunc' objects> (<method 'reduce' of 'numpy.ufunc' objects>)
<method 'get' of 'dict' objects>                             --     91     91 -- 0.00004 0.00004 -- ~:0:<method 'get' of 'dict' objects> (<method 'get' of 'dict' objects>)
<built-in method builtins.next>                              --  40220  40220 -- 0.05038 0.21636 -- ~:0:<built-in method builtins.next> (<built-in method builtins.next>)
    _no_nep50_warning                                        --  40200  40200 -- 0.08528 0.16598 -- onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/numpy/core/_ufunc_config.py:452:_no_nep50_warning (_no_nep50_warning)
        <method 'set' of 'ContextVar' objects>               --  20100  20100 -- 0.04353 0.04353 -- ~:0:<method 'set' of 'ContextVar' objects> (<method 'set' of 'ContextVar' objects>)
        <method 'reset' of 'ContextVar' objects>             --  20100  20100 -- 0.03716 0.03716 -- ~:0:<method 'reset' of 'ContextVar' objects> (<method 'reset' of 'ContextVar' objects>)
<built-in method posix.fspath>                               --     24     24 -- 0.00001 0.00001 -- ~:0:<built-in method posix.fspath> (<built-in method posix.fspath>)
<built-in method _thread.get_ident>                          --     12     12 -- 0.00001 0.00001 -- ~:0:<built-in method _thread.get_ident> (<built-in method _thread.get_ident>)
<method 'rfind' of 'str' objects>                            --     18     18 -- 0.00003 0.00003 -- ~:0:<method 'rfind' of 'str' objects> (<method 'rfind' of 'str' objects>)

if GPU is available#

if get_device().upper() == 'GPU':

    train_session = OrtGradientOptimizer(
        onx_train, list(weights), device='cuda', learning_rate=5e-4,
        warm_start=False, max_iter=max_iter, batch_size=batch_size)

    benches.append(benchmark(nn, train_session, name='NN-GPU'))

Linear Regression#

lr = MLPRegressor(hidden_layer_sizes=tuple(), max_iter=max_iter,
                  solver='sgd', learning_rate_init=5e-2, alpha=0,
                  n_iter_no_change=max_iter * 3, batch_size=batch_size,
                  nesterovs_momentum=False, momentum=0,
                  learning_rate='invscaling')

with warnings.catch_warnings():
    warnings.simplefilter('ignore')
    lr.fit(X, y)


onx = to_onnx(nn, X_train[:1].astype(numpy.float32), target_opset=15)
onx_train = add_loss_output(onx)

inits = get_train_initializer(onx)
weights = {k: v for k, v in inits.items() if k != "shape_tensor"}
pprint(list((k, v[0].shape) for k, v in weights.items()))

train_session = OrtGradientOptimizer(
    onx_train, list(weights), device='cpu', learning_rate=1e-4,
    warm_start=False, max_iter=max_iter, batch_size=batch_size)

benches.append(benchmark(lr, train_session, name='LR-CPU'))

if get_device().upper() == 'GPU':

    train_session = OrtGradientOptimizer(
        onx_train, list(weights), device='cuda', learning_rate=1e-4,
        warm_start=False, max_iter=max_iter, batch_size=batch_size)

    benches.append(benchmark(nn, train_session, name='LR-GPU'))
[('coefficient', (100, 50)),
 ('intercepts', (1, 50)),
 ('coefficient1', (50, 10)),
 ('intercepts1', (1, 10)),
 ('coefficient2', (10, 1)),
 ('intercepts2', (1, 1))]
[benchmark] LR-CPU
somewhere/workspace/onnxcustom/onnxcustom_UT_39_std/_venv/lib/python3.9/site-packages/sklearn/neural_network/_multilayer_perceptron.py:679: ConvergenceWarning: Stochastic Optimizer: Maximum iterations (100) reached and the optimization hasn't converged yet.
  warnings.warn(
[benchmark] skl=100 iterations - 3.212737553054467 seconds
[benchmark] ort=100 iterations - 3.4550795000977814 seconds

GPU profiling#

if get_device().upper() == 'GPU':
    ps = profile(lambda: benchmark(nn, train_session, name='LR-GPU'))[0]
    root, nodes = profile2graph(ps, clean_text=clean_name)
    text = root.to_text()
    print(text)

Graphs#

Dataframe first.

df = DataFrame(benches).set_index('name')
df
skl ort iter_skl iter_ort losses_skl losses_ort
name
NN-CPU 9.019831 3.500119 100 100 [10181.41993408203, 1304.4270812988282, 1035.6... [30392.508, 23225.424, 19217.426, 15981.25, 13...
LR-CPU 3.212738 3.455080 100 100 [2857.916968460083, 30.73458254814148, 26.6517... [31250.82, 11663.726, 5872.9165, 2606.5598, 18...


text output

print(df)
             skl  ...                                         losses_ort
name              ...
NN-CPU  9.019831  ...  [30392.508, 23225.424, 19217.426, 15981.25, 13...
LR-CPU  3.212738  ...  [31250.82, 11663.726, 5872.9165, 2606.5598, 18...

[2 rows x 6 columns]

Graphs.

fig, ax = plt.subplots(1, 2, figsize=(10, 4))
df[['skl', 'ort']].plot.bar(title="Processing time", ax=ax[0])
ax[0].tick_params(axis='x', rotation=30)
for bench in benches:
    ax[1].plot(bench['losses_skl'][1:], label='skl-' + bench['name'])
    ax[1].plot(bench['losses_ort'][1:], label='ort-' + bench['name'])
ax[1].set_title("Losses")
ax[1].set_yscale('log')
ax[1].legend()
Processing time, Losses
<matplotlib.legend.Legend object at 0x7faf8f1f8340>

The gradient update are not exactly the same. It should be improved for a fair comprison.

fig.savefig("plot_orttraining_benchmark.png")
# plt.show()

Total running time of the script: ( 0 minutes 44.902 seconds)

Gallery generated by Sphinx-Gallery