MCPcopy Create free account
hub / github.com/anomalyco/opencode-bench / main

Function main

visualize_instability.py:135–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133
134
135def main() -> None:
136 # ensure this script can be run from anywhere
137 parser = argparse.ArgumentParser(
138 description="Visualize benchmark score instability across runs."
139 )
140 parser.add_argument(
141 "files",
142 nargs="+",
143 type=Path,
144 help="benchmark JSON files (e.g. benchmarks-0.json benchmarks-1.json …)",
145 )
146 parser.add_argument(
147 "--output",
148 type=Path,
149 default=Path("benchmark_instability.png"),
150 help="output image path",
151 )
152 args = parser.parse_args()
153
154 runs = load_runs(args.files)
155 df = melt_scores(runs)
156 if df.empty:
157 raise SystemExit("No runs found in the provided files.")
158 plot_instability(df, args.output)
159
160
161if __name__ == "__main__":

Callers 1

Calls 3

load_runsFunction · 0.85
melt_scoresFunction · 0.85
plot_instabilityFunction · 0.85

Tested by

no test coverage detected