lvwerra HF staff commited on
Commit
3cd5586
·
1 Parent(s): e45c3f7

Update Space (evaluate main: 5aa3982a)

Browse files
Files changed (2) hide show
  1. precision.py +1 -1
  2. requirements.txt +1 -1
precision.py CHANGED
@@ -142,4 +142,4 @@ class Precision(evaluate.Metric):
142
  sample_weight=sample_weight,
143
  zero_division=zero_division,
144
  )
145
- return {"precision": float(score) if score.size == 1 else score}
 
142
  sample_weight=sample_weight,
143
  zero_division=zero_division,
144
  )
145
+ return {"precision": score if getattr(score, "size", 1) > 1 else float(score)}
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- git+https://github.com/huggingface/evaluate@b3f3c02ce2d972bc0e59e346b3318ca2f537e060
2
  scikit-learn
 
1
+ git+https://github.com/huggingface/evaluate@5aa3982a9a8c86e506860e381d428a64b0cce73b
2
  scikit-learn