diff options
author | Diego Russo <diego.russo@arm.com> | 2022-05-30 13:34:14 +0100 |
---|---|---|
committer | Diego Russo <diego.russo@arm.com> | 2022-05-30 13:34:14 +0100 |
commit | 0efca3cadbad5517a59884576ddb90cfe7ac30f8 (patch) | |
tree | abed6cb6fbf3c439fc8d947f505b6a53d5daeb1e /src/mlia/core/advisor.py | |
parent | 0777092695c143c3a54680b5748287d40c914c35 (diff) | |
download | mlia-0efca3cadbad5517a59884576ddb90cfe7ac30f8.tar.gz |
Add MLIA codebase0.3.0-rc.1
Add MLIA codebase including sources and tests.
Change-Id: Id41707559bd721edd114793618d12ccd188d8dbd
Diffstat (limited to 'src/mlia/core/advisor.py')
-rw-r--r-- | src/mlia/core/advisor.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mlia/core/advisor.py b/src/mlia/core/advisor.py new file mode 100644 index 0000000..868d0c7 --- /dev/null +++ b/src/mlia/core/advisor.py @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 +"""Inference advisor module.""" +from abc import abstractmethod + +from mlia.core.common import NamedEntity +from mlia.core.context import Context +from mlia.core.workflow import WorkflowExecutor + + +class InferenceAdvisor(NamedEntity): + """Base class for inference advisors.""" + + @abstractmethod + def configure(self, context: Context) -> WorkflowExecutor: + """Configure advisor execution.""" + + def run(self, context: Context) -> None: + """Run inference advisor.""" + executor = self.configure(context) + executor.run() |