MCPcopy Create free account
hub / github.com/RightNow-AI/autokernel / load_profile_report

Function load_profile_report

extract.py:392–402  ·  view source on GitHub ↗

Load and validate the profile report JSON. Returns None on failure.

(path: str)

Source from the content-addressed store, hash-verified

390# ---------------------------------------------------------------------------
391
392def load_profile_report(path: str) -> Optional[Dict[str, Any]]:
393 """Load and validate the profile report JSON. Returns None on failure."""
394 if not os.path.exists(path):
395 return None
396 try:
397 with open(path, "r", encoding="utf-8") as f:
398 data = json.load(f)
399 return data
400 except (json.JSONDecodeError, IOError) as e:
401 print(f"ERROR: Failed to read profile report: {e}")
402 return None
403
404
405def get_supported_kernels(report: Dict[str, Any]) -> List[Dict[str, Any]]:

Callers 1

extract_kernelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected