MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / _load_queries

Function _load_queries

src/benchmarks/writing_bench/run.py:75–91  ·  view source on GitHub ↗

Load queries from benchmark JSONL.

(query_indices=None, limit=None)

Source from the content-addressed store, hash-verified

73
74
75def _load_queries(query_indices=None, limit=None) -> List[dict]:
76 """Load queries from benchmark JSONL."""
77 queries = []
78 with open(_BENCHMARK_PATH, "r", encoding="utf-8") as f:
79 for line in f:
80 line = line.strip()
81 if line:
82 queries.append(json.loads(line))
83
84 if query_indices:
85 idx_set = set(query_indices)
86 queries = [q for q in queries if q["index"] in idx_set]
87
88 if limit and limit < len(queries):
89 queries = queries[:limit]
90
91 return queries
92
93
94_DRAFT_EXTENSIONS = {".md", ".txt", ".tex", ".html"}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected