MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / load_benchmarks

Function load_benchmarks

benchmark/loader.py:11–20  ·  view source on GitHub ↗
(path: str | Path)

Source from the content-addressed store, hash-verified

9
10
11def load_benchmarks(path: str | Path) -> list[BenchmarkItem]:
12 benchmark_path = Path(path)
13 items: list[BenchmarkItem] = []
14 with benchmark_path.open("r", encoding="utf-8") as stream:
15 for line in stream:
16 line = line.strip()
17 if not line:
18 continue
19 items.append(BenchmarkItem.from_dict(json.loads(line)))
20 return items
21
22
23def find_benchmark_by_name(path: str | Path, benchmark_name: str) -> BenchmarkItem:

Callers 5

_resolve_benchmarksMethod · 0.90
handle_benchmark_listFunction · 0.90
handle_doctorFunction · 0.90
_load_benchmark_indexFunction · 0.90
find_benchmark_by_nameFunction · 0.85

Calls 1

from_dictMethod · 0.80

Tested by

no test coverage detected