From 02fadac7152deaae07ea775df1c050dbf1911f30 Mon Sep 17 00:00:00 2001 From: Hitesh Shah Date: Mon, 4 May 2026 12:09:25 -0700 Subject: [PATCH] Mark auto-opt command as deprecated --- olive/cli/auto_opt.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/olive/cli/auto_opt.py b/olive/cli/auto_opt.py index 2e0f73444f..ef8f5fed8d 100644 --- a/olive/cli/auto_opt.py +++ b/olive/cli/auto_opt.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -------------------------------------------------------------------------- +import logging from argparse import ArgumentParser from collections import OrderedDict from copy import deepcopy @@ -25,13 +26,19 @@ from olive.package_config import OlivePackageConfig from olive.telemetry import action +logger = logging.getLogger(__name__) + class AutoOptCommand(BaseOliveCLICommand): @staticmethod def register_subcommand(parser: ArgumentParser): sub_parser = parser.add_parser( "auto-opt", - help="Automatically optimize the performance of the input model.", + help=( + "Automatically optimize the performance of the input model.\n" + "**** DEPRECATION WARNING ****\n" + '"auto-opt" command is deprecated in favor of "optimize".' + ), ) # Model options @@ -174,6 +181,11 @@ def register_subcommand(parser: ArgumentParser): @action def run(self): + logger.warning( + "**** DEPRECATION WARNING ****\n" + '"auto-opt" command is deprecated in favor of "optimize". Please switch to using "optimize".\n' + "Deprecated commands will be removed entirely in future release." + ) return self._run_workflow() def _get_run_config(self, tempdir) -> dict: