microsoft/onnxruntime-extensions

Public

mirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
df7a9f337c69567dc9c58400d3ec8004bcafb794

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

onnxruntime_extensions/__init__.py

45lines · modecode

1# Copyright (c) Microsoft Corporation. All rights reserved.
2# Licensed under the MIT License. See License.txt in the project root for
3# license information.
4###############################################################################
5
6"""
7The `onnxruntime-extensions` Python package offers an API that allows users to generate models for pre-processing and
8post-processing tasks. In addition, it also provides an API to register custom operations implemented in Python.
9This enables more flexibility and control over model execution, thus expanding the functionality of the ONNX Runtime.
10"""
11
12__author__ = "Microsoft"
13
14__all__ = [
15 'gen_processing_models',
16 'get_library_path',
17 'Opdef', 'onnx_op', 'PyCustomOpDef', 'PyOp',
18 'enable_py_op',
19 'expand_onnx_inputs',
20 'hook_model_op',
21 'default_opset_domain',
22 'OrtPyFunction', 'PyOrtFunction',
23 'optimize_model',
24 'make_onnx_model',
25 'ONNXRuntimeError',
26 'hash_64',
27 '__version__',
28]
29
30from ._version import __version__
31from ._ocos import get_library_path
32from ._ocos import Opdef, PyCustomOpDef
33from ._ocos import hash_64
34from ._ocos import enable_py_op
35from ._ocos import expand_onnx_inputs
36from ._ocos import hook_model_op
37from ._ocos import default_opset_domain
38from ._cuops import * # noqa
39from ._ortapi2 import OrtPyFunction as PyOrtFunction # backward compatibility
40from ._ortapi2 import OrtPyFunction, optimize_model, make_onnx_model, ONNXRuntimeError
41from .cvt import gen_processing_models
42
43# rename the implementation with a more formal name
44onnx_op = Opdef.declare
45PyOp = PyCustomOpDef
46