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

Function _load_master

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

Load master data, returning None with a warning on failure.

(master_data_path: str | None)

Source from the content-addressed store, hash-verified

1244
1245
1246def _load_master(master_data_path: str | None) -> MasterData | None:
1247 """Load master data, returning None with a warning on failure."""
1248 try:
1249 return load_master_data(master_data_path)
1250 except FileNotFoundError:
1251 print(
1252 " Warning: Master data file not found. Using legacy comparators."
1253 )
1254 except Exception as e:
1255 print(
1256 f" Warning: Failed to load master data ({e}). Using legacy comparators."
1257 )
1258 return None
1259
1260
1261def _resolve_directories(args: argparse.Namespace) -> tuple:

Callers 1

mainFunction · 0.85

Calls 1

load_master_dataFunction · 0.90

Tested by

no test coverage detected