mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 19:32:34 +01:00
fw/exec: Add add_classifier() method
Add add_classifier() method to context. Allow plugins to add classifiers to the current job, or the run as a whole. This will ensure that the new classifiers are propagated to all relevant current and future artifacts and metrics.
This commit is contained in:
committed by
Marc Bonnici
parent
796f62d924
commit
659e60414f
@@ -181,6 +181,11 @@ class Job(object):
|
||||
if force or self.status < status:
|
||||
self.status = status
|
||||
|
||||
def add_classifier(self, name, value, overwrite=False):
|
||||
if name in self.classifiers and not overwrite:
|
||||
raise ValueError('Cannot overwrite "{}" classifier.'.format(name))
|
||||
self.classifiers[name] = value
|
||||
|
||||
def __str__(self):
|
||||
return '{} ({}) [{}]'.format(self.id, self.label, self.iteration)
|
||||
|
||||
|
Reference in New Issue
Block a user