aboutsummaryrefslogtreecommitdiff
path: root/src/mlia/backend/config.py
diff options
context:
space:
mode:
authorBenjamin Klimczak <benjamin.klimczak@arm.com>2023-04-05 17:06:56 +0100
committerBenjamin Klimczak <benjamin.klimczak@arm.com>2023-04-11 13:27:31 +0100
commit8d00200d5aa2011bc91ccc688ee93caf5b6980f6 (patch)
treecfd80a2cc6d6772888c8aabf93d53329e0f92b01 /src/mlia/backend/config.py
parentc7c894ee0721b1076fcea25506d7b84772cc5704 (diff)
downloadmlia-8d00200d5aa2011bc91ccc688ee93caf5b6980f6.tar.gz
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
Diffstat (limited to 'src/mlia/backend/config.py')
-rw-r--r--src/mlia/backend/config.py5
1 files changed, 4 insertions, 1 deletions
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."""