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