Build status Build Status Windows GitHub Issues MIT License Downloads Forks Stars size

onnxcustom: custom ONNX#


Examples, tutorial on how to convert machine learned models into ONNX, implement your own converter or runtime, or even train with ONNX / onnxruntime.

The function check or the command line python -m onnxcustom check checks the module is properly installed and returns processing time for a couple of functions or simply:

import onnxcustom

The documentation also introduces onnx, onnxruntime for inference and training. The tutorial related to scikit-learn has been merged into sklearn-onnx documentation. Among the tools this package implements, you may find:

  • a tool to convert NVidia Profilder logs into a dataframe,

  • a SGD optimizer similar to what scikit-learn implements but based on onnxruntime-training and able to train an CPU and GPU,

  • functions to manipulate onnx graph.

Installation of onnxruntime-training

onnxruntime-training is only available on Linux. The CPU can be installed with the following instruction.

pip install onnxruntime-training --extra-index-url

Versions using GPU with CUDA or ROCm are available. Check to find a specific version. You can use it on Windows inside WSL (Windows Linux Subsystem) or compile it for CPU:

python tools\ci_build\ --skip_tests --build_dir .\build\Windows --config Release --build_shared_lib --build_wheel --numpy_version= --cmake_generator="Visual Studio 16 2019" --enable_training --enable_training_ops --enable_training_torch_interop

GPU versions work better on WSL, see Build onnxruntime on WSL (Windows Linux Subsystem). onnxcustom can be installed from pypi.