MCPcopy Create free account
hub / github.com/NVIDIA/SOL-ExecBench / _load_solution

Function _load_solution

src/sol_execbench/cli/main.py:65–74  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

63
64
65def _load_solution(path: Path) -> Solution:
66 sol_dict = json.loads(path.read_text())
67 # Resolve source file contents relative to the solution JSON directory.
68 sol_dir = path.parent
69 for src in sol_dict.get("sources", []):
70 if not src.get("content"):
71 src_path = sol_dir / src["path"]
72 if src_path.exists():
73 src["content"] = src_path.read_text()
74 return Solution(**sol_dict)
75
76
77def _load_config(path: Optional[Path]) -> BenchmarkConfig:

Callers 1

cliFunction · 0.85

Calls 1

SolutionClass · 0.85

Tested by

no test coverage detected