PyO3: Add optional candle.onnx module (#1282)

* Start onnx integration

* Merge remote-tracking branch 'upstream/main' into feat/pyo3-onnx

* Implement ONNXModel

* `fmt`

* add `onnx` flag to python ci

* Pin `protoc` to `25.0`

* Setup `protoc` in wheel builds

* Build wheels with `onnx`

* Install `protoc` in manylinux containers

* `apt` -> `yum`

* Download `protoc` via bash script

* Back to `manylinux: auto`

* Disable `onnx` builds for linux
This commit is contained in:
Lukas Kreussel
2023-11-08 06:37:50 +01:00
committed by GitHub
parent 7920b45c8a
commit f3a4f3db76
10 changed files with 343 additions and 6 deletions

6
candle-pyo3/src/utils.rs Normal file
View File

@ -0,0 +1,6 @@
use pyo3::exceptions::PyValueError;
use pyo3::prelude::*;
pub fn wrap_err(err: ::candle::Error) -> PyErr {
PyErr::new::<PyValueError, _>(format!("{err:?}"))
}