Memory usage

The first benchmark based on scikti-learn's benchmark shows high peaks of memory usage for the python runtime on linear models. Let's see how to measure that.

Artificial huge data

Let's minimize the cost of verifications on scikit-learn's side.

Profiling the prediction function

Most of the time is taken out into casting into float. Let's take it out.

Much better.

SGDClasifier

This models is implemented with many ONNX nodes. Let's how it behaves.

The code in mlprodict/onnxrt/onnx_inference_node.py just calls an operator and updates the list containing all the results. The time in here is significant if the number of node is huge if the python runtime is used.

Memory profiling

This is not very informative.

Memory profiling outside the notebook

More precise.

The notebook seems to increase the memory usage.