Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 141 additions & 7 deletions _unittests/ut_onnxrt/test_onnxrt_python_runtime_.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _unittests/ut_testing/test_LONG_sklearn_example.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
@brief test log(time=41s)
@brief test log(time=61s)
"""
import unittest
import os
Expand Down
3 changes: 1 addition & 2 deletions _unittests/ut_testing/test_experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ def ort_path(self, x, pads):
op = helper.make_node('Pad', ['X', 'P'], ['Y'])
graph = helper.make_graph([op], 'graph', [X, P], [Y])
model = helper.make_model(graph, producer_name='model')
op_set = model.opset_import.add()
op_set.domain = ''
op_set = model.opset_import[0] # pylint: disable=E1101
op_set.version = get_opset_number_from_onnx()
sess = InferenceSession(model.SerializeToString())
return numpy.squeeze(sess.run(['Y'], {'X': x, 'P': npads}))
Expand Down
3 changes: 0 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ environment:
- PYTHON: "C:\\Python38-x64"
PYTHON_VERSION: "3.8.x"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"
init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"

Expand Down
5 changes: 2 additions & 3 deletions mlprodict/onnxrt/ops_cpu/_op_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,14 @@
from .op_gather_elements import GatherElements
from .op_gemm import Gemm
from .op_global_average_pool import GlobalAveragePool
from .op_greater import Greater
from .op_greater_or_equal import GreaterOrEqual
from .op_greater import Greater, GreaterOrEqual
from .op_floor import Floor
from .op_identity import Identity
from .op_if import If
from .op_imputer import Imputer
from .op_isnan import IsNaN
from .op_label_encoder import LabelEncoder
from .op_less import Less
from .op_less import Less, LessOrEqual
from .op_linear_classifier import LinearClassifier
from .op_linear_regressor import LinearRegressor
from .op_log import Log
Expand Down
12 changes: 12 additions & 0 deletions mlprodict/onnxrt/ops_cpu/op_greater.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,15 @@ def _run(self, a, b): # pylint: disable=W0221

def to_python(self, inputs):
return self._to_python_numpy(inputs, self.__class__.__name__.lower())


class GreaterOrEqual(OpRunBinary):

def __init__(self, onnx_node, desc=None, **options):
OpRunBinary.__init__(self, onnx_node, desc=desc, **options)

def _run(self, a, b): # pylint: disable=W0221
return (numpy.greater_equal(a, b), )

def to_python(self, inputs):
return self._to_python_numpy(inputs, "greater_equal")
20 changes: 0 additions & 20 deletions mlprodict/onnxrt/ops_cpu/op_greater_or_equal.py

This file was deleted.

12 changes: 12 additions & 0 deletions mlprodict/onnxrt/ops_cpu/op_less.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,15 @@ def _run(self, a, b): # pylint: disable=W0221

def to_python(self, inputs):
return self._to_python_numpy(inputs, self.__class__.__name__.lower())


class LessOrEqual(OpRunBinary):

def __init__(self, onnx_node, desc=None, **options):
OpRunBinary.__init__(self, onnx_node, desc=desc, **options)

def _run(self, a, b): # pylint: disable=W0221
return (numpy.less_equal(a, b), )

def to_python(self, inputs):
return self._to_python_numpy(inputs, "less_equal")