MCPcopy
hub / github.com/opentrace/opentrace / make_small_subset

Function make_small_subset

benchmark/download_swe_bench.py:79–98  ·  view source on GitHub ↗

Create a 5-instance subset for quick testing.

()

Source from the content-addressed store, hash-verified

77
78
79def make_small_subset() -> None:
80 """Create a 5-instance subset for quick testing."""
81 subset_path = DATA_DIR / "swe_bench_lite_5.json"
82 if subset_path.exists():
83 return
84
85 instances = json.loads(JSON_PATH.read_text())
86 # Pick instances from different repos for variety
87 seen_repos: set[str] = set()
88 subset: list[dict] = []
89 for inst in instances:
90 repo = inst["repo"]
91 if repo not in seen_repos and len(subset) < 5:
92 subset.append(inst)
93 seen_repos.add(repo)
94
95 subset_path.write_text(json.dumps(subset, indent=2))
96 repos = [s["repo"] for s in subset]
97 print(f"Created 5-instance subset: {subset_path}")
98 print(f" Repos: {', '.join(repos)}")
99
100
101def main() -> None:

Callers 1

mainFunction · 0.85

Calls 2

setFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected