onnxruntime/onnxruntime/__init__.py
edgchen1 c5576d70a6
Fix build issues (#3214)
* Fixed issues with Python and inference-only build.

* Handle ImportError for training imports.

* fix windows build

* fix compile error

* fix centos build

* fix windows build

* fix compile error

* Use SafeInt for allocation calculation, fix typo.

Co-authored-by: Ethan Tao <ettao@microsoft.com>
2020-03-17 16:10:23 -07:00

22 lines
1.2 KiB
Python

# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------
"""
ONNX Runtime is a performance-focused scoring engine for Open Neural Network Exchange (ONNX) models.
For more information on ONNX Runtime, please see `aka.ms/onnxruntime <https://aka.ms/onnxruntime/>`_ or the `Github project <https://github.com/microsoft/onnxruntime/>`_.
"""
__version__ = "1.2.0"
__author__ = "Microsoft"
from onnxruntime.capi._pybind_state import get_all_providers, get_available_providers, get_device, RunOptions, SessionOptions, set_default_logger_severity, NodeArg, ModelMetadata, GraphOptimizationLevel, ExecutionMode, OrtDevice, SessionIOBinding
from onnxruntime.capi.session import InferenceSession, IOBinding
from onnxruntime.capi import onnxruntime_validation
try:
from onnxruntime.capi._pybind_state import TrainingParameters
from onnxruntime.capi.session import TrainingSession
except ImportError:
print("ONNX Runtime Training identifiers are unavailable.")
onnxruntime_validation.check_distro_info()