mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 20:11:20 +00:00
classifiers: usability updates
- add IterationResult-level classifiers that get merged into every added metric (saves having to pass the same classifiers to each metric added). - Added a global alias to csv result processor's use_all_classifiers attribute.
This commit is contained in:
parent
32f3dc21e4
commit
2ee9b40527
@ -44,7 +44,7 @@ from datetime import datetime
|
||||
from wlauto.core.extension import Extension
|
||||
from wlauto.exceptions import WAError
|
||||
from wlauto.utils.types import numeric
|
||||
from wlauto.utils.misc import enum_metaclass
|
||||
from wlauto.utils.misc import enum_metaclass, merge_dicts
|
||||
|
||||
|
||||
class ResultManager(object):
|
||||
@ -260,8 +260,11 @@ class IterationResult(object):
|
||||
self.events = []
|
||||
self.metrics = []
|
||||
self.artifacts = []
|
||||
self.classifiers = {}
|
||||
|
||||
def add_metric(self, name, value, units=None, lower_is_better=False, classifiers=None):
|
||||
classifiers = merge_dicts(self.classifiers, classifiers or {},
|
||||
list_duplicates='last', should_normalize=False)
|
||||
self.metrics.append(Metric(name, value, units, lower_is_better, classifiers))
|
||||
|
||||
def has_metric(self, name):
|
||||
|
@ -67,6 +67,7 @@ class CsvReportProcessor(ResultProcessor):
|
||||
|
||||
parameters = [
|
||||
Parameter('use_all_classifiers', kind=bool, default=False,
|
||||
global_alias='use_all_classifiers',
|
||||
description="""
|
||||
If set to ``True``, this will add a column for every classifier
|
||||
that features in at least one collected metric.
|
||||
|
Loading…
x
Reference in New Issue
Block a user