manayporwal07 commited on
Commit
270fbd3
·
verified ·
1 Parent(s): dcdfcaa

Update evaluator_module.py

Browse files
Files changed (1) hide show
  1. evaluator_module.py +3 -2
evaluator_module.py CHANGED
@@ -126,8 +126,8 @@ class AetherScoreEvaluator:
126
  eval_id = self._generate_eval_id(prompt, response)
127
 
128
  # If already stored in cache direclty we can return from there.
129
- # if eval_id in self.cache:
130
- # return self.cache[eval_id]
131
 
132
  scores, reasons = {}, {}
133
 
@@ -155,6 +155,7 @@ class AetherScoreEvaluator:
155
  # self.cache[eval_id] = result
156
 
157
  return result
 
158
  # Batch Evaluation # Input of JSON/CSV file
159
  def evaluate_batch(self, data: List[Dict], mode: str = "comprehensive") -> List[Dict]:
160
  """Process a batch of evaluations in parallel."""
 
126
  eval_id = self._generate_eval_id(prompt, response)
127
 
128
  # If already stored in cache direclty we can return from there.
129
+ if eval_id in self.cache:
130
+ return self.cache[eval_id]
131
 
132
  scores, reasons = {}, {}
133
 
 
155
  # self.cache[eval_id] = result
156
 
157
  return result
158
+
159
  # Batch Evaluation # Input of JSON/CSV file
160
  def evaluate_batch(self, data: List[Dict], mode: str = "comprehensive") -> List[Dict]:
161
  """Process a batch of evaluations in parallel."""