diff options
author | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2022-06-27 09:10:49 +0100 |
---|---|---|
committer | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2022-06-27 16:18:55 +0100 |
commit | 0ee201dfa023a9f42e1c8a282e96c231c6769e07 (patch) | |
tree | abd0048d0f1922470e3fe6befcc32f62d38a52f5 /src/mlia/core/common.py | |
parent | 7faf2c4763f299ee53b1ed100025ba50021c8313 (diff) | |
download | mlia-0ee201dfa023a9f42e1c8a282e96c231c6769e07.tar.gz |
MLIA-522 No 'perf' in mode 'all' for TFLite files
Fix the issue that no performance information is shown for TFLite files
when the mode 'all_tests' is used.
Change-Id: I8b4df4ab84ba9783b582ad449a34bf6177037e14
Diffstat (limited to 'src/mlia/core/common.py')
-rw-r--r-- | src/mlia/core/common.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mlia/core/common.py b/src/mlia/core/common.py index 5fbad42..a11bf9a 100644 --- a/src/mlia/core/common.py +++ b/src/mlia/core/common.py @@ -7,7 +7,8 @@ core module. """ from abc import ABC from abc import abstractmethod -from enum import Enum +from enum import auto +from enum import Flag from typing import Any # This type is used as type alias for the items which are being passed around @@ -17,16 +18,16 @@ from typing import Any DataItem = Any -class AdviceCategory(Enum): +class AdviceCategory(Flag): """Advice category. Enumeration of advice categories supported by ML Inference Advisor. """ - OPERATORS = 1 - PERFORMANCE = 2 - OPTIMIZATION = 3 - ALL = 4 + OPERATORS = auto() + PERFORMANCE = auto() + OPTIMIZATION = auto() + ALL = OPERATORS | PERFORMANCE | OPTIMIZATION @classmethod def from_string(cls, value: str) -> "AdviceCategory": |