In [1]:
from sklearn_benchmarks.reporting.hp_match import HpMatchReporting
from sklearn_benchmarks.utils import default_run_dir, default_report_config
from pathlib import Path
import pandas as pd
pd.set_option('display.max_colwidth', None)
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)

ONNX Runtime vs. scikit-learn

In [4]:
run_dir = Path(run_dir)
In [5]:
reporting = HpMatchReporting(**report_config, run_dir=run_dir)
reporting.make_report()

We assume here there is a perfect match between the hyperparameters of both librairies. For a given set of parameters and a given dataset, we compute the speed-up time scikit-learn / time onnx. For instance, a speed-up of 2 means that onnx is twice as fast as scikit-learn for a given set of parameters and a given dataset.

Benchmark environment information

System

python 3.8.12 | packaged by conda-forge | (default, Jan 30 2022, 23:42:07) [GCC 9.4.0]
executable /usr/share/miniconda/envs/sklbench/bin/python
machine Linux-5.11.0-1028-azure-x86_64-with-glibc2.10

Dependencies

pip 22.0.4
setuptools 60.10.0
sklearn 1.0.2
numpy 1.22.3
scipy 1.8.0
Cython None
pandas 1.4.1
matplotlib 3.5.1
joblib 1.1.0
threadpoolctl 3.1.0

Threadpool

user_api internal_api prefix filepath version threading_layer architecture num_threads
0 blas openblas libopenblas /usr/share/miniconda/envs/sklbench/lib/libopenblasp-r0.3.18.so 0.3.18 pthreads SkylakeX 2
1 openmp openmp libgomp /usr/share/miniconda/envs/sklbench/lib/libgomp.so.1.0.0 None NaN NaN 2

Cpu_count

cpu_count 2
physical_cpu_count 2