Spaces:
Running
Running
Request too large ... TPM 6000, Requested 6841 Reduce max_tokens for the judge
Browse files- ragbench_eval/judge.py +2 -1
- ragbench_eval/metrics.py +2 -1
ragbench_eval/judge.py
CHANGED
|
@@ -41,7 +41,8 @@ class RAGJudge:
|
|
| 41 |
},
|
| 42 |
{"role": "user", "content": prompt},
|
| 43 |
]
|
| 44 |
-
raw = self.client.chat(messages, max_tokens=2048)
|
|
|
|
| 45 |
|
| 46 |
try:
|
| 47 |
data = json.loads(raw)
|
|
|
|
| 41 |
},
|
| 42 |
{"role": "user", "content": prompt},
|
| 43 |
]
|
| 44 |
+
#raw = self.client.chat(messages, max_tokens=2048)
|
| 45 |
+
raw = self.client.chat(messages, max_tokens=512)
|
| 46 |
|
| 47 |
try:
|
| 48 |
data = json.loads(raw)
|
ragbench_eval/metrics.py
CHANGED
|
@@ -72,6 +72,7 @@ def compute_rmse_auc(
|
|
| 72 |
roc_auc_score(y_true_adh, y_pred_adh)
|
| 73 |
)
|
| 74 |
else:
|
| 75 |
-
metrics["auroc_adherence"] = float("nan")
|
|
|
|
| 76 |
|
| 77 |
return metrics
|
|
|
|
| 72 |
roc_auc_score(y_true_adh, y_pred_adh)
|
| 73 |
)
|
| 74 |
else:
|
| 75 |
+
#metrics["auroc_adherence"] = float("nan")
|
| 76 |
+
metrics["auroc_adherence"] = 0.5 # or None, but not float("nan")
|
| 77 |
|
| 78 |
return metrics
|