Zekun Wu commited on
Commit
1bad9c0
1 Parent(s): bb4bda1
Files changed (1) hide show
  1. util/evaluator.py +1 -1
util/evaluator.py CHANGED
@@ -10,7 +10,7 @@ class evaluator:
10
  def validate_scores(self, scores):
11
  required_keys = ["Factually Correct", "Useful", "Context Specific", "User Specific", "Provides Pluralism"]
12
  for key in required_keys:
13
- if key not in scores or not isinstance(scores[key], (int, float)) or not (0 <= scores[key] <= 1):
14
  return {"Factually Correct": -1,"Useful": -1,"Context Specific": -1,"User Specific":-1,"Provides Pluralism":-1}
15
 
16
  return scores
 
10
  def validate_scores(self, scores):
11
  required_keys = ["Factually Correct", "Useful", "Context Specific", "User Specific", "Provides Pluralism"]
12
  for key in required_keys:
13
+ if key not in scores or not isinstance(scores[key], (int, float)) or not (-1 <= scores[key] <= 1):
14
  return {"Factually Correct": -1,"Useful": -1,"Context Specific": -1,"User Specific":-1,"Provides Pluralism":-1}
15
 
16
  return scores