danieldux commited on
Commit
693597c
1 Parent(s): b0179e8

Update ISCO_Hierarchical_Accuracy class to handle multilabel predictions

Browse files
Files changed (1) hide show
  1. metric_template_1.py +11 -0
metric_template_1.py CHANGED
@@ -86,8 +86,19 @@ class ISCO_Hierarchical_Accuracy(evaluate.Metric):
86
  citation=_CITATION,
87
  inputs_description=_KWARGS_DESCRIPTION,
88
  # This defines the format of each prediction and reference
 
 
 
 
 
 
89
  features=datasets.Features(
90
  {
 
 
 
 
 
91
  "predictions": datasets.Value("string"),
92
  "references": datasets.Value("string"),
93
  }
 
86
  citation=_CITATION,
87
  inputs_description=_KWARGS_DESCRIPTION,
88
  # This defines the format of each prediction and reference
89
+ # features=datasets.Features(
90
+ # {
91
+ # "predictions": datasets.Value("string"),
92
+ # "references": datasets.Value("string"),
93
+ # }
94
+ # ),
95
  features=datasets.Features(
96
  {
97
+ "predictions": datasets.Sequence(datasets.Value("string")),
98
+ "references": datasets.Sequence(datasets.Value("string")),
99
+ }
100
+ if self.config_name == "multilabel"
101
+ else {
102
  "predictions": datasets.Value("string"),
103
  "references": datasets.Value("string"),
104
  }