POT is depricated (#16758)
This commit is contained in:
parent
219a0eebdc
commit
7997354359
@ -2,15 +2,17 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import warnings
|
|
||||||
|
|
||||||
import openvino.tools.pot.api
|
import openvino.tools.pot.api
|
||||||
import openvino.tools.pot.engines
|
import openvino.tools.pot.engines
|
||||||
import openvino.tools.pot.graph
|
import openvino.tools.pot.graph
|
||||||
import openvino.tools.pot.pipeline
|
import openvino.tools.pot.pipeline
|
||||||
|
from openvino.tools.pot.utils.logger import get_logger
|
||||||
|
|
||||||
|
|
||||||
warnings.warn('Import compression is deprecated. Please use openvino.tools.pot instead', DeprecationWarning)
|
logger = get_logger(__name__)
|
||||||
|
logger.warning('Import compression is deprecated. Please use openvino.tools.pot instead')
|
||||||
|
|
||||||
|
|
||||||
sys.modules["compression.api"] = openvino.tools.pot.api
|
sys.modules["compression.api"] = openvino.tools.pot.api
|
||||||
sys.modules["compression.engines"] = openvino.tools.pot.engines
|
sys.modules["compression.engines"] = openvino.tools.pot.engines
|
||||||
|
@ -19,13 +19,17 @@ from ....graph.model_utils import save_model
|
|||||||
from ....samplers.creator import create_sampler
|
from ....samplers.creator import create_sampler
|
||||||
from ....utils.logger import get_logger
|
from ....utils.logger import get_logger
|
||||||
|
|
||||||
|
|
||||||
|
logger = get_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import nevergrad as ng
|
import nevergrad as ng
|
||||||
|
|
||||||
NEVERGRAD_AVAILABLE = True
|
NEVERGRAD_AVAILABLE = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
NEVERGRAD_AVAILABLE = False
|
NEVERGRAD_AVAILABLE = False
|
||||||
warnings.warn(
|
logger.warning(
|
||||||
'Nevergrad package could not be imported. If you are planning to use '
|
'Nevergrad package could not be imported. If you are planning to use '
|
||||||
'any hyperparameter optimization algo, consider installing it '
|
'any hyperparameter optimization algo, consider installing it '
|
||||||
'using pip. This implies advanced usage of the tool. '
|
'using pip. This implies advanced usage of the tool. '
|
||||||
@ -39,8 +43,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
SKOPT_AVAILABLE = False
|
SKOPT_AVAILABLE = False
|
||||||
|
|
||||||
logger = get_logger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
@COMPRESSION_ALGORITHMS.register('OptimizationAlgorithm')
|
@COMPRESSION_ALGORITHMS.register('OptimizationAlgorithm')
|
||||||
class OptimizationAlgorithm(Algorithm):
|
class OptimizationAlgorithm(Algorithm):
|
||||||
|
@ -4,6 +4,14 @@
|
|||||||
from .data_loader import DataLoader
|
from .data_loader import DataLoader
|
||||||
from .engine import Engine
|
from .engine import Engine
|
||||||
from .metric import Metric
|
from .metric import Metric
|
||||||
|
from openvino.tools.pot.utils.logger import get_logger
|
||||||
|
|
||||||
|
|
||||||
|
logger = get_logger(__name__)
|
||||||
|
logger.warning('Post-training Optimization Tool is deprecated and will be removed in the future.'
|
||||||
|
' Please use Neural Network Compression Framework'
|
||||||
|
' instead: https://github.com/openvinotoolkit/nncf')
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'Metric', 'DataLoader', 'Engine'
|
'Metric', 'DataLoader', 'Engine'
|
||||||
|
@ -27,6 +27,9 @@ def main():
|
|||||||
|
|
||||||
|
|
||||||
def app(argv):
|
def app(argv):
|
||||||
|
logger.warning('Post-training Optimization Tool is deprecated and will be removed in the future.'
|
||||||
|
' Please use Neural Network Compression Framework'
|
||||||
|
' instead: https://github.com/openvinotoolkit/nncf')
|
||||||
telemetry = start_session_telemetry()
|
telemetry = start_session_telemetry()
|
||||||
parser = get_common_argument_parser()
|
parser = get_common_argument_parser()
|
||||||
args = parser.parse_args(args=argv)
|
args = parser.parse_args(args=argv)
|
||||||
|
Loading…
Reference in New Issue
Block a user