2020-11-18 01:02:24 +00:00
|
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
# Licensed under the MIT License.
|
|
|
|
|
|
|
|
|
|
from .get_azcopy import get_azcopy
|
2021-01-14 03:21:49 +00:00
|
|
|
from .logger import get_logger
|
2022-04-26 16:35:16 +00:00
|
|
|
from .platform_helpers import is_linux, is_macOS, is_windows
|
2020-11-18 01:02:24 +00:00
|
|
|
from .run import run
|
2021-01-28 21:59:51 +00:00
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
import flatbuffers # noqa
|
2022-04-26 16:35:16 +00:00
|
|
|
|
2021-01-28 21:59:51 +00:00
|
|
|
from .reduced_build_config_parser import parse_config
|
|
|
|
|
except ImportError:
|
2022-04-26 16:35:16 +00:00
|
|
|
get_logger("tools_python_utils").info("flatbuffers module is not installed. parse_config will not be available")
|
2022-03-15 05:52:12 +00:00
|
|
|
|
|
|
|
|
# see if we can make the pytorch helpers available.
|
|
|
|
|
import importlib.util # noqa
|
2022-04-26 16:35:16 +00:00
|
|
|
|
2022-03-15 05:52:12 +00:00
|
|
|
have_torch = importlib.util.find_spec("torch")
|
|
|
|
|
if have_torch:
|
|
|
|
|
from .pytorch_export_helpers import infer_input_info
|