Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion olive/cli/auto_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------
import logging
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
from argparse import ArgumentParser
from collections import OrderedDict
from copy import deepcopy
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Loading