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

Function _resolve_problem_dir

src/sol_execbench/cli/main.py:83–100  ·  view source on GitHub ↗

Return (definition.json, workload.jsonl, config.json?, solution.json?) inside a problem directory.

(
    problem_dir: Path,
)

Source from the content-addressed store, hash-verified

81
82
83def _resolve_problem_dir(
84 problem_dir: Path,
85) -> tuple[Path, Path, Optional[Path], Optional[Path]]:
86 """Return (definition.json, workload.jsonl, config.json?, solution.json?) inside a problem directory."""
87 def_path = problem_dir / "definition.json"
88 wkl_path = problem_dir / "workload.jsonl"
89 cfg_path = problem_dir / "config.json"
90 sol_path = problem_dir / "solution.json"
91 if not def_path.exists():
92 raise click.ClickException(f"definition.json not found in {problem_dir}")
93 if not wkl_path.exists():
94 raise click.ClickException(f"workload.jsonl not found in {problem_dir}")
95 return (
96 def_path,
97 wkl_path,
98 cfg_path if cfg_path.exists() else None,
99 sol_path if sol_path.exists() else None,
100 )
101
102
103def _print_traces_table(traces: list[Trace]) -> None:

Callers 1

cliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected