aboutsummaryrefslogtreecommitdiff
path: root/src/mlia/cli/commands.py
diff options
context:
space:
mode:
authorDmitrii Agibov <dmitrii.agibov@arm.com>2022-11-15 13:19:53 +0000
committerDmitrii Agibov <dmitrii.agibov@arm.com>2022-11-16 09:42:15 +0000
commit302ce432829ae7c25e100a5cca718f0aadbe4fd4 (patch)
tree96e31bc88f795752ecaa6a9672fe512f8b0d9041 /src/mlia/cli/commands.py
parent47fc50576e7040680c19e152592b2c5e5cc297f5 (diff)
downloadmlia-302ce432829ae7c25e100a5cca718f0aadbe4fd4.tar.gz
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
Diffstat (limited to 'src/mlia/cli/commands.py')
-rw-r--r--src/mlia/cli/commands.py23
1 files changed, 11 insertions, 12 deletions
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()