From 8d00200d5aa2011bc91ccc688ee93caf5b6980f6 Mon Sep 17 00:00:00 2001 From: Benjamin Klimczak Date: Wed, 5 Apr 2023 17:06:56 +0100 Subject: MLIA-825 Make backend installation more generic Use the backend registry to manage installation routines for different backends as well. This makes the process more generic and allows us to move towards plug & play for backends (i.e. there should be no code changes needed in the general MLIA code to add/support new backends). Change-Id: Ib7c772ec52b2f4d857c2c9871e44dfff97e9d970 --- src/mlia/backend/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mlia/backend/config.py') diff --git a/src/mlia/backend/config.py b/src/mlia/backend/config.py index 8d14b28..2e34ffb 100644 --- a/src/mlia/backend/config.py +++ b/src/mlia/backend/config.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates. +# SPDX-FileCopyrightText: Copyright 2022-2023, Arm Limited and/or its affiliates. # SPDX-License-Identifier: Apache-2.0 """Backend config module.""" from __future__ import annotations @@ -8,6 +8,7 @@ from enum import auto from enum import Enum from typing import cast +from mlia.backend.install import Installation from mlia.core.common import AdviceCategory @@ -59,11 +60,13 @@ class BackendConfiguration: supported_advice: list[AdviceCategory], supported_systems: list[System] | None, backend_type: BackendType, + installation: Installation | None, ) -> None: """Set up basic information about the backend.""" self.supported_advice = supported_advice self.supported_systems = supported_systems self.type = backend_type + self.installation = installation def __str__(self) -> str: """List supported advice.""" -- cgit v1.2.1