microsoft/onnxruntime-extensions

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
edgchen1/retry_android_emulator_startup

Branches

Tags

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

Clone

HTTPS

Download ZIP

onnxruntime_extensions/__init__.py

47lines · 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 'ort_inference',
17 'get_library_path',
18 'Opdef', 'onnx_op', 'PyCustomOpDef', 'PyOp',
19 'enable_py_op',
20 'expand_onnx_inputs',
21 'hook_model_op',
22 'default_opset_domain',
23 'OrtPyFunction', 'PyOrtFunction',
24 'optimize_model',
25 'make_onnx_model',
26 'ONNXRuntimeError',
27 'hash_64',
28 '__version__',
29]
30
31from ._version import __version__
32from ._ocos import get_library_path
33from ._ocos import Opdef, PyCustomOpDef
34from ._ocos import hash_64
35from ._ocos import enable_py_op
36from ._ocos import expand_onnx_inputs
37from ._ocos import hook_model_op
38from ._ocos import default_opset_domain
39from ._cuops import * # noqa
40from ._ortapi2 import OrtPyFunction as PyOrtFunction # backward compatibility
41from ._ortapi2 import OrtPyFunction, ort_inference, optimize_model, make_onnx_model
42from ._ortapi2 import ONNXRuntimeError, ONNXRuntimeException
43from .cvt import gen_processing_models
44
45# rename the implementation with a more formal name
46onnx_op = Opdef.declare
47PyOp = PyCustomOpDef
48