Skip to content

Commit

Permalink
Rename mo with ov
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Boguszewski <adrian.boguszewski@intel.com>
  • Loading branch information
adrianboguszewski committed Apr 12, 2024
1 parent 1a0e01a commit 21c765c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/anomalib/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def add_export_arguments(self, parser: ArgumentParser) -> None:
added = parser.add_method_arguments(
Engine,
"export",
skip={"mo_args", "model"},
skip={"ov_args", "model"},
)
self.subcommand_method_arguments["export"] = added
add_openvino_export_arguments(parser)
Expand Down
6 changes: 3 additions & 3 deletions src/anomalib/cli/utils/openvino.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def add_openvino_export_arguments(parser: ArgumentParser) -> None:
"""Add OpenVINO arguments to parser under --mo key."""
if get_common_cli_parser is not None:
group = parser.add_argument_group("OpenVINO Model Optimizer arguments (optional)")
mo_parser = get_common_cli_parser()
ov_parser = get_common_cli_parser()
# remove redundant keys from mo keys
for arg in mo_parser._actions: # noqa: SLF001
for arg in ov_parser._actions: # noqa: SLF001
if arg.dest in ("help", "input_model", "output_dir"):
continue
group.add_argument(f"--mo_args.{arg.dest}", type=arg.type, default=arg.default, help=arg.help)
group.add_argument(f"--ov_args.{arg.dest}", type=arg.type, default=arg.default, help=arg.help)
else:
logger.info("OpenVINO is possibly not installed in the environment. Skipping adding it to parser.")

0 comments on commit 21c765c

Please sign in to comment.