Spaces:
Running
Running
Update evaluate.py
Browse files- evaluate.py +6 -4
evaluate.py
CHANGED
|
@@ -194,17 +194,18 @@ def load_test_fixtures():
|
|
| 194 |
# The old code used a relative path, which is unreliable.
|
| 195 |
# This new code builds an absolute path to the fixture file based on
|
| 196 |
# the location of this (evaluate.py) script.
|
| 197 |
-
script_dir = Path(__file__).parent
|
| 198 |
#default_fixture_file = script_dir / "small_test_cases_v10.jsonl"
|
| 199 |
#candidates = [env_path] if env_path else [str(default_fixture_file)]
|
| 200 |
|
| 201 |
-
default_fixture_file = script_dir / "Test_Syn_Caregiving_Patient.jsonl"
|
| 202 |
-
candidates = [env_path] if env_path else [str(default_fixture_file)]
|
| 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 |
|
| 209 |
path = next((p for p in candidates if p and os.path.exists(p)), None)
|
| 210 |
if not path:
|
|
@@ -214,7 +215,8 @@ def load_test_fixtures():
|
|
| 214 |
# Use the corrected v10 file if available
|
| 215 |
# if "conversation_test_fixtures_v10.jsonl" in path:
|
| 216 |
# if "small_test_cases_v10.jsonl" in path:
|
| 217 |
-
if "Test_Syn_Caregiving_Patient.jsonl" in path:
|
|
|
|
| 218 |
print(f"Using corrected test fixtures: {path}")
|
| 219 |
|
| 220 |
with open(path, "r", encoding="utf-8") as f:
|
|
|
|
| 194 |
# The old code used a relative path, which is unreliable.
|
| 195 |
# This new code builds an absolute path to the fixture file based on
|
| 196 |
# the location of this (evaluate.py) script.
|
| 197 |
+
# script_dir = Path(__file__).parent
|
| 198 |
#default_fixture_file = script_dir / "small_test_cases_v10.jsonl"
|
| 199 |
#candidates = [env_path] if env_path else [str(default_fixture_file)]
|
| 200 |
|
| 201 |
+
# default_fixture_file = script_dir / "Test_Syn_Caregiving_Patient.jsonl"
|
| 202 |
+
# candidates = [env_path] if env_path else [str(default_fixture_file)]
|
| 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_Factual.jsonl"]
|
| 209 |
|
| 210 |
path = next((p for p in candidates if p and os.path.exists(p)), None)
|
| 211 |
if not path:
|
|
|
|
| 215 |
# Use the corrected v10 file if available
|
| 216 |
# if "conversation_test_fixtures_v10.jsonl" in path:
|
| 217 |
# if "small_test_cases_v10.jsonl" in path:
|
| 218 |
+
# if "Test_Syn_Caregiving_Patient.jsonl" in path:
|
| 219 |
+
if "Test_Syn_Factual.jsonl" in path:
|
| 220 |
print(f"Using corrected test fixtures: {path}")
|
| 221 |
|
| 222 |
with open(path, "r", encoding="utf-8") as f:
|