aboutsummaryrefslogtreecommitdiff
path: root/src/mlia/target/cortex_a/events.py
blob: 76f17ba1884c9f17e567e41cd3d6126d2f5a4a9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# SPDX-FileCopyrightText: Copyright 2022-2023, Arm Limited and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
"""Cortex-A MLIA module events."""
from dataclasses import dataclass
from pathlib import Path

from mlia.core.events import Event
from mlia.core.events import EventDispatcher
from mlia.target.cortex_a.config import CortexAConfiguration


@dataclass
class CortexAAdvisorStartedEvent(Event):
    """Event with Cortex-A advisor parameters."""

    model: Path
    target: CortexAConfiguration


class CortexAAdvisorEventHandler(EventDispatcher):
    """Event handler for the Cortex-A inference advisor."""

    def on_cortex_a_advisor_started(self, event: CortexAAdvisorStartedEvent) -> None:
        """Handle CortexAAdvisorStarted event."""