Spaces:
Sleeping
Sleeping
Update evaluation.py
Browse files- evaluation.py +4 -4
evaluation.py
CHANGED
@@ -176,7 +176,7 @@ def calculate_metrics(question, q_dataset, response, docs, time_taken):
|
|
176 |
"response_time": time_taken
|
177 |
}
|
178 |
|
179 |
-
store_rmse(question,
|
180 |
# Now, make sure the values passed to RMSE calculation are numeric
|
181 |
#predicted_completeness = predicted_metrics['completeness']
|
182 |
|
@@ -190,11 +190,11 @@ def calculate_metrics(question, q_dataset, response, docs, time_taken):
|
|
190 |
'''
|
191 |
if isinstance(predicted_metrics_rmse, (int, float)) and isinstance(ground_truth_metrics, (int, float)):
|
192 |
rmse_value = compute_rmse([predicted_metrics_rmse], [ground_truth_metrics])
|
193 |
-
|
194 |
else:
|
195 |
-
|
196 |
|
197 |
-
return
|
198 |
|
199 |
''' def retrieve_ground_truths(question, dataset):
|
200 |
for split_name, instances in dataset.items():
|
|
|
176 |
"response_time": time_taken
|
177 |
}
|
178 |
|
179 |
+
store_rmse(question, predicted_metrics_rmse, ground_truth_metrics)
|
180 |
# Now, make sure the values passed to RMSE calculation are numeric
|
181 |
#predicted_completeness = predicted_metrics['completeness']
|
182 |
|
|
|
190 |
'''
|
191 |
if isinstance(predicted_metrics_rmse, (int, float)) and isinstance(ground_truth_metrics, (int, float)):
|
192 |
rmse_value = compute_rmse([predicted_metrics_rmse], [ground_truth_metrics])
|
193 |
+
predicted_metrics["rmse"] = rmse_value # Adding RMSE to metrics
|
194 |
else:
|
195 |
+
predicted_metrics["rmse"] = "Invalid RMSE calculation"
|
196 |
|
197 |
+
return predicted_metrics
|
198 |
|
199 |
''' def retrieve_ground_truths(question, dataset):
|
200 |
for split_name, instances in dataset.items():
|