lhy commited on
Commit
67dbed7
·
1 Parent(s): d90b011
Files changed (1) hide show
  1. ranking_loss.py +3 -2
ranking_loss.py CHANGED
@@ -15,6 +15,7 @@
15
 
16
  import evaluate
17
  import datasets
 
18
  from sklearn.metrics import label_ranking_loss
19
 
20
  # TODO: Add BibTeX citation
@@ -71,8 +72,8 @@ class RankingLoss(evaluate.Metric):
71
  inputs_description=_KWARGS_DESCRIPTION,
72
  # This defines the format of each prediction and reference
73
  features=datasets.Features({
74
- 'predictions': datasets.Sequence(),
75
- 'references': datasets.Sequence(),
76
  }),
77
  # Homepage of the module for documentation
78
  # homepage="http://module.homepage",
 
15
 
16
  import evaluate
17
  import datasets
18
+ from typing import Iterable
19
  from sklearn.metrics import label_ranking_loss
20
 
21
  # TODO: Add BibTeX citation
 
72
  inputs_description=_KWARGS_DESCRIPTION,
73
  # This defines the format of each prediction and reference
74
  features=datasets.Features({
75
+ 'predictions': Iterable,
76
+ 'references': Iterable,
77
  }),
78
  # Homepage of the module for documentation
79
  # homepage="http://module.homepage",