Spaces:
Running
Running
Update evaluate.py
Browse files- evaluate.py +6 -5
evaluate.py
CHANGED
|
@@ -9,7 +9,7 @@ from typing import List, Dict, Any
|
|
| 9 |
from pathlib import Path
|
| 10 |
|
| 11 |
# --- ADD THIS FLAG ---
|
| 12 |
-
NLU_ONLY_TEST =
|
| 13 |
# ---------------------
|
| 14 |
|
| 15 |
# --- Imports from the main application ---
|
|
@@ -203,14 +203,14 @@ def load_test_fixtures():
|
|
| 203 |
|
| 204 |
# --- END: DEFINITIVE FIX ---
|
| 205 |
# candidates = [env_path] if env_path else ["conversation_test_fixtures_v10.jsonl"]
|
| 206 |
-
# candidates = [env_path] if env_path else ["small_test_cases_v10.jsonl"]
|
| 207 |
# candidates = [env_path] if env_path else ["Test_Syn_Caregiving_Patient.jsonl"]
|
| 208 |
# candidates = [env_path] if env_path else ["Test_Syn_Caregiving_Caregiver.jsonl"]
|
| 209 |
# candidates = [env_path] if env_path else ["Test_Syn_Factual.jsonl"]
|
| 210 |
# candidates = [env_path] if env_path else ["Test_Syn_Multi_Hop.jsonl"]
|
| 211 |
# candidates = [env_path] if env_path else ["Test_Syn_Gen_Chat.jsonl"]
|
| 212 |
# candidates = [env_path] if env_path else ["Test_Syn_Gen_Know.jsonl"]
|
| 213 |
-
candidates = [env_path] if env_path else ["Test_Syn_Sum.jsonl"]
|
|
|
|
| 214 |
|
| 215 |
path = next((p for p in candidates if p and os.path.exists(p)), None)
|
| 216 |
if not path:
|
|
@@ -219,14 +219,15 @@ def load_test_fixtures():
|
|
| 219 |
|
| 220 |
# Use the corrected v10 file if available
|
| 221 |
# if "conversation_test_fixtures_v10.jsonl" in path:
|
| 222 |
-
|
| 223 |
# if "Test_Syn_Caregiving_Patient.jsonl" in path:
|
| 224 |
# if "Test_Syn_Caregiving_Caregiver.jsonl" in path:
|
| 225 |
# if "Test_Syn_Factual.jsonl" in path:
|
| 226 |
# if "Test_Syn_Multi_Hop.jsonl" in path:
|
| 227 |
# if "Test_Syn_Gen_Chat.jsonl" in path:
|
| 228 |
# if "Test_Syn_Gen_Know.jsonl" in path:
|
| 229 |
-
if "Test_Syn_Sum.jsonl" in path:
|
|
|
|
| 230 |
print(f"Using corrected test fixtures: {path}")
|
| 231 |
|
| 232 |
with open(path, "r", encoding="utf-8") as f:
|
|
|
|
| 9 |
from pathlib import Path
|
| 10 |
|
| 11 |
# --- ADD THIS FLAG ---
|
| 12 |
+
NLU_ONLY_TEST = False
|
| 13 |
# ---------------------
|
| 14 |
|
| 15 |
# --- Imports from the main application ---
|
|
|
|
| 203 |
|
| 204 |
# --- END: DEFINITIVE FIX ---
|
| 205 |
# candidates = [env_path] if env_path else ["conversation_test_fixtures_v10.jsonl"]
|
|
|
|
| 206 |
# candidates = [env_path] if env_path else ["Test_Syn_Caregiving_Patient.jsonl"]
|
| 207 |
# candidates = [env_path] if env_path else ["Test_Syn_Caregiving_Caregiver.jsonl"]
|
| 208 |
# candidates = [env_path] if env_path else ["Test_Syn_Factual.jsonl"]
|
| 209 |
# candidates = [env_path] if env_path else ["Test_Syn_Multi_Hop.jsonl"]
|
| 210 |
# candidates = [env_path] if env_path else ["Test_Syn_Gen_Chat.jsonl"]
|
| 211 |
# candidates = [env_path] if env_path else ["Test_Syn_Gen_Know.jsonl"]
|
| 212 |
+
# candidates = [env_path] if env_path else ["Test_Syn_Sum.jsonl"]
|
| 213 |
+
candidates = [env_path] if env_path else ["small_test_cases_v10.jsonl"]
|
| 214 |
|
| 215 |
path = next((p for p in candidates if p and os.path.exists(p)), None)
|
| 216 |
if not path:
|
|
|
|
| 219 |
|
| 220 |
# Use the corrected v10 file if available
|
| 221 |
# if "conversation_test_fixtures_v10.jsonl" in path:
|
| 222 |
+
|
| 223 |
# if "Test_Syn_Caregiving_Patient.jsonl" in path:
|
| 224 |
# if "Test_Syn_Caregiving_Caregiver.jsonl" in path:
|
| 225 |
# if "Test_Syn_Factual.jsonl" in path:
|
| 226 |
# if "Test_Syn_Multi_Hop.jsonl" in path:
|
| 227 |
# if "Test_Syn_Gen_Chat.jsonl" in path:
|
| 228 |
# if "Test_Syn_Gen_Know.jsonl" in path:
|
| 229 |
+
# if "Test_Syn_Sum.jsonl" in path:
|
| 230 |
+
if "small_test_cases_v10.jsonl" in path:
|
| 231 |
print(f"Using corrected test fixtures: {path}")
|
| 232 |
|
| 233 |
with open(path, "r", encoding="utf-8") as f:
|