File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class PlotTagBoxplot(ProcessingStep):
1111
1212 def __init__ (self ,
1313 metric_name : str ,
14- tag : str ,
14+ tag : str = "" ,
1515 filename : str = "" ,
1616 ylabel : str = "" ,
1717 xlabel : str = "" ,
@@ -64,10 +64,15 @@ def execute(self,sample):
6464 except ValueError :
6565 self .write (sample )
6666
67- tv = sample .get_tag (self .tag )
68- if tv not in self .values :
69- self .values [tv ] = []
70- self .values [tv ].append (float (sample .metrics [index ]))
67+ if self .tag == "" :
68+ if not self .metric_name in self .values :
69+ self .values [self .metric_name ]= []
70+ self .values [self .metric_name ].append (float (sample .metrics [index ]))
71+ else :
72+ tv = sample .get_tag (self .tag )
73+ if tv not in self .values :
74+ self .values [tv ] = []
75+ self .values [tv ].append (float (sample .metrics [index ]))
7176
7277 self .write (sample )
7378
@@ -134,7 +139,7 @@ def __init__(self,
134139 raise NotSupportedError ("{}: file format, {}, not supported ..." .format (file_format ))
135140
136141 if filename == "" :
137- self .filename = self .__name__ + "-" + metric_name + "." + file_format
142+ self .filename = self .__name__ + "-" + self . metric_names [ 0 ] + "." + file_format
138143 else :
139144 self .filename = filename
140145 if ylabel == "" :
You can’t perform that action at this time.
0 commit comments