Skip to content

Commit

Permalink
Add support for Py3.7, onnx 1.5, onnxruntime 0.4 (#293)
Browse files Browse the repository at this point in the history
* Update Linux CI with py3.7, onnx1.5, onnxrt 0.4

* Update win32-conda-CI.yml

* reflect python versions

* update onnx version to 1.4.1 for py 3.5
  • Loading branch information
vinitra authored May 8, 2019
1 parent 854dcd0 commit 8f4c7bd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .azure-pipelines/linux-conda-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
Python36:
python.version: '3.6'
ONNX_PATH: onnx==1.4.1
Python37:
python.version: '3.7'
ONNX_PATH: onnx==1.5.0
maxParallel: 3

steps:
Expand All @@ -42,7 +45,7 @@ jobs:
pip install -e .
cd ..
pip install -r requirements-dev.txt
test '$(python.version)' != '2.7' && pip install onnxruntime==0.3.0
test '$(python.version)' != '2.7' && pip install onnxruntime==0.4.0
pip install pytest
git clone --recursive https://github.com/cjlin1/libsvm libsvm
cd libsvm
Expand Down
9 changes: 6 additions & 3 deletions .azure-pipelines/win32-conda-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ jobs:
vmImage: 'vs2017-win2016'
strategy:
matrix:
# No python 2.x since no available ONNX package for Windows
# Python27:
# python.version: '2.7'
Python35:
python.version: '3.5'
ONNX_PATH: onnx==1.4.1
Expand All @@ -27,6 +24,12 @@ jobs:
ONNX_PATH: onnx==1.4.1
ONNXRT_PATH: onnxruntime==0.3.0
COREML_PATH: git+https://github.com/apple/coremltools

Python37:
python.version: '3.7'
ONNX_PATH: onnx==1.5.0
ONNXRT_PATH: onnxruntime==0.4.0
COREML_PATH: git+https://github.com/apple/coremltools

maxParallel: 3

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pip install git+https://github.com/onnx/onnxmltools
If you choose to install `onnxmltools` from its source code, you must set the environment variable `ONNX_ML=1` before installing the `onnx` package.

## Dependencies
This package relies on ONNX, NumPy, and ProtoBuf. If you are converting a model from scikit-learn, Core ML, Keras, or LightGBM, you will need an environment with the respective package installed from the list below:
This package relies on ONNX, NumPy, and ProtoBuf. If you are converting a model from scikit-learn, Core ML, Keras, LightGBM, SparkML, XGBoost, or LibSVM, you will need an environment with the respective package installed from the list below:
1. scikit-learn
2. CoreMLTools
3. Keras (version 2.0.8 or higher) with the corresponding Tensorflow version
Expand All @@ -38,6 +38,8 @@ This package relies on ONNX, NumPy, and ProtoBuf. If you are converting a model
6. XGBoost (scikit-learn interface)
7. libsvm

`onnxmltools` has been tested with Python **2.7**, **3.5**, **3.6**, and **3.7**.

# Examples
If you want the converted ONNX model to be compatible with a certain ONNX version, please specify the target_opset parameter upon invoking the convert function. The following Keras model conversion example demonstrates this below. You can identify the mapping from ONNX Operator Sets (referred to as opsets) to ONNX releases in the [versioning documentation](https://github.com/onnx/onnx/blob/master/docs/Versioning.md#released-versions).

Expand Down

0 comments on commit 8f4c7bd

Please sign in to comment.