From 302ce432829ae7c25e100a5cca718f0aadbe4fd4 Mon Sep 17 00:00:00 2001 From: Dmitrii Agibov Date: Tue, 15 Nov 2022 13:19:53 +0000 Subject: MLIA-649 Support tosa-checker as a backend - Add new type of the backend based on python packages - Add installation class for TOSA checker - Update documentation - Extend support of the parameter "force" in the "install" command Change-Id: I95567b75e1cfe85daa1f1c3d359975bb67b2504e --- src/mlia/cli/commands.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/mlia/cli/commands.py') diff --git a/src/mlia/cli/commands.py b/src/mlia/cli/commands.py index 4be7f3e..09fe9de 100644 --- a/src/mlia/cli/commands.py +++ b/src/mlia/cli/commands.py @@ -20,7 +20,6 @@ from __future__ import annotations import logging from pathlib import Path -from typing import cast from mlia.api import ExecutionContext from mlia.api import generate_supported_operators_report @@ -249,29 +248,29 @@ def backend_install( noninteractive: bool = False, force: bool = False, ) -> None: - """Install configuration.""" + """Install backend.""" logger.info(CONFIG) manager = get_installation_manager(noninteractive) - install_from_path = path is not None - - if install_from_path: - manager.install_from(cast(Path, path), name, force) + if path is not None: + manager.install_from(path, name, force) else: eula_agreement = not i_agree_to_the_contained_eula - manager.download_and_install(name, eula_agreement) + manager.download_and_install(name, eula_agreement, force) -def backend_uninstall( - name: str, -) -> None: - """Uninstall backend(s).""" +def backend_uninstall(name: str) -> None: + """Uninstall backend.""" + logger.info(CONFIG) + manager = get_installation_manager(noninteractive=True) manager.uninstall(name) def backend_list() -> None: - """List backend status.""" + """List backends status.""" + logger.info(CONFIG) + manager = get_installation_manager(noninteractive=True) manager.show_env_details() -- cgit v1.2.1