MCPcopy Create free account
hub / github.com/FlashSampling/FlashSampling / main

Function main

benchmarking/parse_ncu_sweep.py:34–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33
34def main():
35 parser = argparse.ArgumentParser(description=__doc__)
36 parser.add_argument("--dir", required=True, help="Directory with bszN/ subdirs")
37 args = parser.parse_args()
38
39 base = Path(args.dir)
40 bsz_dirs = sorted(base.glob("bsz*"), key=lambda p: int(p.name[3:]))
41 if not bsz_dirs:
42 print(f"No bszN/ directories found in {base}")
43 return
44
45 df = _load_sweep(base, bsz_dirs)
46 if df.empty:
47 print("No data parsed. Are the .txt files in NCU CSV format (--csv --page raw)?")
48 return
49
50 print(f"NCU Batch-Size Sweep Summary: {base}")
51 print()
52 _print_summary(df)
53
54
55def _load_sweep(base: Path, bsz_dirs: list[Path]) -> pd.DataFrame:

Callers 1

parse_ncu_sweep.pyFile · 0.70

Calls 2

_load_sweepFunction · 0.85
_print_summaryFunction · 0.85

Tested by

no test coverage detected