Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
Signed-off-by: xadupre <xadupre@microsoft.com>
  • Loading branch information
xadupre committed Oct 3, 2024
1 parent 3ae696a commit e27ed95
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on: [push, pull_request]
jobs:
run:
name: ${{ matrix.os }} py==${{ matrix.python_version }} - sklearn${{ matrix.sklearn_version }} - ${{ matrix.onnxrt_version }}
name: ${{ matrix.os }} py==${{ matrix.python_version }} - sklearn${{ matrix.sklearn_version }} - ${{ matrix.onnxrt_version }} - ${{ matrix.onnx_version }} - lgbm${{ matrix.lgbm_version }} - xgb${{ matrix.xgboost_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -13,7 +13,16 @@ jobs:
documentation: 0
numpy_version: '>=1.21.1'
scipy_version: '>=1.7.0'
onnx_version: 'onnx==1.16.0'
onnx_version: 'onnx==1.17.0'
onnxrt_version: 'onnxruntime==1.19.2'
sklearn_version: '==1.5.2'
lgbm_version: ">=4"
xgboost_version: ">=2"
- python_version: '3.12'
documentation: 0
numpy_version: '>=1.21.1'
scipy_version: '>=1.7.0'
onnx_version: 'onnx==1.16.2'
onnxrt_version: 'onnxruntime==1.18.0'
sklearn_version: '==1.4.2'
lgbm_version: ">=4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def calculate_one_hot_encoder_output_shapes(operator):
operator.outputs[0].type = FloatTensorType(
[N, len(int_categories)], doc_string=operator.outputs[0].type.doc_string
)
elif len(str_categories) > 0 and type(operator.inputs[0].type) == StringTensorType:
elif (
len(str_categories) > 0
and type(operator.inputs[0].type) == StringTensorType # noqa: E721
):
operator.outputs[0].type = FloatTensorType(
[N, len(str_categories)], doc_string=operator.outputs[0].type.doc_string
)
Expand Down
10 changes: 5 additions & 5 deletions onnxmltools/convert/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,12 +433,12 @@ def convert_tensorflow(
custom_op_conversions=None,
**kwargs
):
import pkgutil

if not pkgutil.find_loader("tf2onnx"):
raise RuntimeError(
try:
import tf2onnx # noqa: F401
except ImportError as e:
raise ImportError(
"tf2onnx is not installed, please install it before calling this function."
)
) from e

return _convert_tf_wrapper(
frozen_graph_def,
Expand Down

0 comments on commit e27ed95

Please sign in to comment.