MCPcopy Create free account
hub / github.com/google/adk-samples / _resolve_directories

Function _resolve_directories

python/agents/invoice-processing/eval/eval.py:1261–1281  ·  view source on GitHub ↗

Resolve and validate ground truth and agent output directories.

(args: argparse.Namespace)

Source from the content-addressed store, hash-verified

1259
1260
1261def _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
1284def _collect_case_ids(

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected