blob: cbfd1990b6c95fa0a1239a2d459e7a434da480ea (
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
25
26
27
28
|
# SPDX-FileCopyrightText: Copyright 2022-2023, Arm Limited and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
"""TOSA advisor events."""
from __future__ import annotations
from dataclasses import dataclass
from pathlib import Path
from mlia.core.events import Event
from mlia.core.events import EventDispatcher
from mlia.target.tosa.config import TOSAConfiguration
from mlia.target.tosa.reporters import MetadataDisplay
@dataclass
class TOSAAdvisorStartedEvent(Event):
"""Event with TOSA advisor parameters."""
model: Path
device: TOSAConfiguration
tosa_metadata: MetadataDisplay | None
class TOSAAdvisorEventHandler(EventDispatcher):
"""Event handler for the TOSA inference advisor."""
def on_tosa_advisor_started(self, event: TOSAAdvisorStartedEvent) -> None:
"""Handle TOSAAdvisorStartedEvent event."""
|