aboutsummaryrefslogtreecommitdiff
path: root/src/mlia/__init__.py
blob: ed9ae87511bbc046ca32aa87c5427cc7bdfb7a3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
"""Init of MLIA."""
import logging
import os

import pkg_resources

# redirect warnings to logging
logging.captureWarnings(True)


# as TensorFlow tries to configure root logger
# it should be configured before importing TensorFlow
root_logger = logging.getLogger()
root_logger.addHandler(logging.NullHandler())


# disable TensorFlow warning messages
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"

__version__ = pkg_resources.get_distribution("mlia").version