mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 11:22:41 +01:00
framework/output: save classifiers in Result
Save classifiers at Result as well as Metric level. Reason: when processing output, one might want to filter complete results, as well as individual metrics. While it is in theory possible to get the classifiers for a job by simply extracting the common classifiers between all metrics, this fails when there are no metrics generated for a job (note that one might still want to process the output in this case, e.g. for the artifacts).
This commit is contained in:
committed by
Marc Bonnici
parent
c5659d51f1
commit
1e21bd2ca8
@@ -1,4 +1,5 @@
|
||||
import logging
|
||||
from copy import copy
|
||||
from datetime import datetime
|
||||
|
||||
from wa.framework import pluginloader, signal, instruments
|
||||
@@ -56,6 +57,10 @@ class Job(object):
|
||||
else:
|
||||
self.workload = self._workload_cache[self.id]
|
||||
|
||||
def set_output(self, output):
|
||||
output.classifiers = copy(self.classifiers)
|
||||
self.output = output
|
||||
|
||||
def initialize(self, context):
|
||||
self.logger.info('Initializing job {} [{}]'.format(self.id, self.iteration))
|
||||
with signal.wrap('WORKLOAD_INITIALIZED', self, context):
|
||||
|
Reference in New Issue
Block a user