File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -426,12 +426,15 @@ def create_model_index(self, metric_mapping):
426
426
result ["dataset" ]["args" ] = dataset_arg_mapping [ds_tag ]
427
427
428
428
if len (metric_mapping ) > 0 :
429
+ result ["metrics" ] = []
429
430
for metric_tag , metric_name in metric_mapping .items ():
430
- result ["metric" ] = {
431
- "name" : metric_name ,
432
- "type" : metric_tag ,
433
- "value" : self .eval_results [metric_name ],
434
- }
431
+ result ["metrics" ].append (
432
+ {
433
+ "name" : metric_name ,
434
+ "type" : metric_tag ,
435
+ "value" : self .eval_results [metric_name ],
436
+ }
437
+ )
435
438
436
439
model_index ["results" ].append (result )
437
440
@@ -446,7 +449,7 @@ def create_metadata(self):
446
449
metadata = _insert_values_as_list (metadata , "tags" , self .tags )
447
450
metadata = _insert_values_as_list (metadata , "datasets" , self .dataset_tags )
448
451
metadata = _insert_values_as_list (metadata , "metrics" , list (metric_mapping .keys ()))
449
- metadata ["model_index " ] = self .create_model_index (metric_mapping )
452
+ metadata ["model-index " ] = self .create_model_index (metric_mapping )
450
453
451
454
return metadata
452
455
You can’t perform that action at this time.
0 commit comments