Resolve and validate ground truth and agent output directories.
(args: argparse.Namespace)
| 1259 | |
| 1260 | |
| 1261 | def _resolve_directories(args: argparse.Namespace) -> tuple: |
| 1262 | """Resolve and validate ground truth and agent output directories.""" |
| 1263 | gt_dir = Path(args.ground_truth) |
| 1264 | if not gt_dir.is_absolute(): |
| 1265 | gt_dir = PROJECT_ROOT / gt_dir |
| 1266 | |
| 1267 | agent_dir = Path(args.agent_output) |
| 1268 | if not agent_dir.is_absolute(): |
| 1269 | if (PROJECT_ROOT / agent_dir).exists(): |
| 1270 | agent_dir = PROJECT_ROOT / agent_dir |
| 1271 | else: |
| 1272 | agent_dir = SCRIPT_DIR / agent_dir |
| 1273 | |
| 1274 | if not gt_dir.exists(): |
| 1275 | print(f"Error: Ground truth directory not found: {gt_dir}") |
| 1276 | sys.exit(1) |
| 1277 | if not agent_dir.exists(): |
| 1278 | print(f"Error: Agent output directory not found: {agent_dir}") |
| 1279 | sys.exit(1) |
| 1280 | |
| 1281 | return gt_dir, agent_dir |
| 1282 | |
| 1283 | |
| 1284 | def _collect_case_ids( |