docs(benchmarking): reflect bench_gpu.py + bench_rf.py added in PR #253#267
Conversation
Bring docs/BENCHMARKING.md in line with the new GPU + RF benchmark scripts so its enumeration of the benchmarks/ suite is no longer stale. - Rewrite the TL;DR bullet to cover the CPU/GPU mix (was CPU-only). - Rename "Micro-benchmarks (benchmarks/)" to "Standalone benchmarks (benchmarks/)" and rewrite its intro; adjust the top-of-file reference to match. - Extend the quickstart block with bench_rf.py plus a container-only bench_gpu.py invocation, and add a pointer to the GPU-benchmark section of benchmarks/README.md. - Add rows to the purpose table for bench_rf.py (sklearn CPU) and bench_gpu.py (Beta-VAE train step + encoder forward on GPU). - Rewrite the single-process note: only the four CPU micro-benchmarks are single-process; bench_rf uses n_jobs=-1 and bench_gpu is multi-GPU MirroredStrategy. Baseline tables intentionally not duplicated — the "Baseline numbers" opener already points readers to benchmarks/README.md. Closes #266
|
Claude finished @claude[bot]'s task in 4m 2s —— View job Claude PR review
Overall: LGTM — tight, well-scoped follow-up. Two inline nits (posted on lines 172-174 and 202) and one out-of-PR observation below. Nothing blocking. What's good
Inline notes
One out-of-PR observation (not for this PR)
On the SKILL.md manual editThe |
| one can be measured in seconds instead of via a full run. Most are CPU micro-benchmarks | ||
| (`bench_normality`, `bench_injection`, `bench_lognorm_downsample`, `bench_pfb_vs_spline`, | ||
| `bench_rf`) that print ops/s; `bench_gpu` is a real-GPU profiler for the Beta-VAE that reports |
There was a problem hiding this comment.
Nit — mild set-membership drift for "CPU micro-benchmarks."
This paragraph groups bench_rf into "CPU micro-benchmarks" (5 scripts). The note near the bottom of the same section (lines 205-208) then says "Only the four CPU micro-benchmarks (bench_normality, bench_injection, bench_lognorm_downsample, bench_pfb_vs_spline) are single-process" — implicitly excluding bench_rf. Both readings coexist in the file.
A reader following the text sequentially won't be tripped up, but anyone grepping for "CPU micro-benchmarks" will see two subsets with the same label. One tightening (drop-in replacement for the two-sentence "Most are CPU… bench_gpu is a real-GPU profiler…" span) that makes the sets consistent with the closing note:
| one can be measured in seconds instead of via a full run. Most are CPU micro-benchmarks | |
| (`bench_normality`, `bench_injection`, `bench_lognorm_downsample`, `bench_pfb_vs_spline`, | |
| `bench_rf`) that print ops/s; `bench_gpu` is a real-GPU profiler for the Beta-VAE that reports | |
| Small standalone scripts that time individual pipeline kernels in isolation, so a change to | |
| one can be measured in seconds instead of via a full run. Most are CPU: four micro-benchmarks | |
| (`bench_normality`, `bench_injection`, `bench_lognorm_downsample`, `bench_pfb_vs_spline`) that | |
| print ops/s, plus `bench_rf` (Random Forest, sklearn `n_jobs=-1`); `bench_gpu` is a real-GPU | |
| profiler for the Beta-VAE that reports throughput + peak VRAM across a per-replica batch-size | |
| sweep (NGC-container-only). **Not** |
The TL;DR bullet at lines 28-32 has the same "Most are CPU (…including bench_rf)" phrasing and would benefit from the same reshape for parallelism, but it's less load-bearing since it's a summary.
|
|
||
| All numbers are single-process; the pipeline parallelizes each kernel across | ||
| `manager.n_processes` workers, so whole-stage throughput scales roughly with core count. | ||
| | `bench_rf.py` | `RandomForestClassifier.fit` + `predict_proba` and the `prepare_latent_features` reshape (sklearn, CPU) | Second-stage RF training + inference (`train.train_random_forest`) | |
There was a problem hiding this comment.
Nit — train.train_random_forest reads as a dotted stage name but isn't one.
The "What is instrumented" table above (line 82) documents the actual umbrella span as train.rf (with .data_generation, .encode, .fit sub-stages). The parenthetical here looks like the same dotted-stage vocabulary but is actually the Python function name (train.py::train_random_forest), which reads as inconsistent within the same file. Two ways to disambiguate:
- If you meant the stage:
(`train.rf` / `train.rf.fit`). - If you meant the function:
(`train_random_forest` in `train.py`)or(`train.py::train_random_forest`).
benchmarks/README.md:40 has the same wording, so worth aligning both in a follow-up (out of this PR's scope) — but the collision with the stage table is only jarring in docs/BENCHMARKING.md where the stage table sits ~120 lines above the row.
|
Internal change — no release note. |
Summary
Follow-up to merged #253 (feat(benchmarks): GPU benchmark for Beta-VAE train step + encoder inference).
docs/BENCHMARKING.mdwas framed as CPU-only and enumerated benchmarks/ scripts in two places — both went stale when #253 landedbenchmarks/bench_gpu.pyandbenchmarks/bench_rf.py. This PR applies exactly the five contiguous edits called out in #266 to bring it back in line withbenchmarks/README.md; nothing else in the tree needs reconciliation.benchmarks/) to Standalone benchmarks (benchmarks/) and rewrote the opener (CPU micro-benchmarks +bench_gpureal-GPU profiler; still uncollected by pytest; still writes JSON tobenchmarks/results/). Also refreshed the matching phrase in the top-of-file intro paragraph. No file-internal anchor targeted the oldmicro-benchmarks-benchmarksslug (verified via grep).python benchmarks/bench_rf.pyline and a container-only./utils/run_container.sh python benchmarks/bench_gpu.py --mode train --find-maxline, plus a one-line pointer to the GPU-benchmark section ofbenchmarks/README.md.bench_rf.py,bench_gpu.py); existing four rows preserved verbatim.manager.n_processes-parallelized in the pipeline);bench_rfuses sklearnn_jobs=-1;bench_gpureports aggregate throughput across--num-gpusMirroredStrategy replicas plus per-GPU peak VRAM.Baseline tables intentionally not duplicated — the "Baseline numbers" opener at ~line 214 already points readers to
benchmarks/README.md, and #266 explicitly said not to copy the Blackwell / bla0 tables here.Per-file rationale for what this PR does not touch (all confirmed in #266):
CLAUDE.md— never mentions benchmarks.CONTRIBUTING.md— only a directory-tree pointer with correct targets; the "micro" descriptor drift there isn't worth churning the caption.README.md,SECURITY.md— no relevant surface.KNOWN_ISSUES.md— no new entry needed for the--find-max 4096int32 launch-config cap; it's benchmark-local and already documented inbench_gpu.py+benchmarks/README.md.benchmarks/README.mdand every.pyunderbenchmarks/— already landed by feat(benchmarks): GPU benchmark for Beta-VAE train step + encoder inference #253.src/aetherscan/cli.py— untouched by feat(benchmarks): GPU benchmark for Beta-VAE train step + encoder inference #253, so no README CLI Reference regeneration.SKILL.md edits (apply manually:
.claude/is read-only in CI).claude/skills/aetherscan-repo-context/SKILL.mdProject Structure tree has abenchmarks/pointer (~lines 140-141) describing the contents as "Standalone micro-benchmarks" — mildly wrong after #253 (the suite now includes a non-micro GPU benchmark). Apply Edit 1 VERBATIM locally.Edit 1: update the
benchmarks/line in the Project Structure tree.Find (exactly, two lines):
Replace with (three lines):
No other lines in SKILL.md need to change — it does not enumerate individual benchmark scripts.
Human-apply steps
@zachtheyek — you're CODEOWNER (
* @zachtheyek) and the only person who can land the SKILL.md change (Claude Code cannot write under.claude/in CI). After this PR merges:```bash
gh pr checkout
open .claude/skills/aetherscan-repo-context/SKILL.md
apply Edit 1 above (two-line block becomes three-line block)
git add .claude/skills/aetherscan-repo-context/SKILL.md
git commit -S -m "docs(skill): note bench_gpu.py in benchmarks/ tree caption"
git push
```
Test plan
pre-commit run --files docs/BENCHMARKING.md— passes (ruff/format skipped, no python touched; end-of-files, trailing-whitespace, private-key, gitleaks all pass).docs/BENCHMARKING.mdfor wording drift vsbenchmarks/README.md.micro-benchmarks-benchmarks(grep clean at author time).Closes #266.
Also closes #264 and #265 (stale placeholders; superseded by #266).