Skip to content

Replace the skills' guessed machine numbers with measured ones - #291

Merged
chrisjz merged 1 commit into
mainfrom
chore/refresh-skills
Aug 23, 2026
Merged

Replace the skills' guessed machine numbers with measured ones#291
chrisjz merged 1 commit into
mainfrom
chore/refresh-skills

Conversation

@chrisjz

@chrisjz chrisjz commented Aug 23, 2026

Copy link
Copy Markdown
Member

Two skills carried performance guidance that was never measured on this machine. Both are now backed by benchmarks against the current stack (Python 3.13, qiskit 2.5.2, torch 2.13), and both corrections went the opposite way from what I expected.

nematode-run-evolution: --parallel does not divide wall-clock

The skill told sessions to compute runtime as ... / parallel_workers, with the example "parallel 1 = 240 episodes ≈ 24 s. With --parallel 4 ≈ 6 s". The serial estimate is good — measured 25.9 s. The division is not.

800 MLPPPO episodes:

--parallel wall speedup
1 31.9 s 1.0x
6 12.0 s 2.7x
12 11.4 s 2.8x
18 11.1 s 2.9x

Speedup saturates at 2.5-3x, essentially reached by 6-8 workers. Each generation is a barrier and the optimiser step between generations is serial, so beyond that you pay fork overhead for nothing. I confirmed it is not population-bound by re-running with population 36 — same plateau.

On small runs more workers are actively slower: 80 episodes cost 5.8 s at --parallel 1 and 7.2 s at --parallel 18.

The skill now carries the measured table, recommends --parallel 8, and its example command uses 8 instead of 4. Per-episode costs were re-measured and the existing figures were close enough to keep (~40 ms MLPPPO, ~110 ms LSTMPPO).

nematode-run-experiments: 16 was right, for the wrong reason

The claim was "Max 16 concurrent sessions — machine handles this without degradation". Sixteen is indeed the sweet spot, but it is where throughput peaks, not a ceiling:

concurrent sessions throughput
16 1.81 sessions/s
24 1.77 sessions/s
32 1.68 sessions/s

So a round that genuinely needs six groups or six seeds can use 24 for ~2% less throughput. The skill previously implied the group limit was machine capacity; it is really about how many arms a comparison can be read with, so that is what it now says.

It also read as though memory might be a constraint. It is not — a session peaks at ~0.5 GB, so even 32 at once is a small fraction of what is available. The skill now says explicitly never to cut an experiment matrix out of memory worry, only because sessions compete for cores.

Added OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 to the launch snippet — each session otherwise spawns a full BLAS thread pool and they oversubscribe each other. Worth ~6% throughput at 24 sessions and more above that. (Same lever that fixed CI in #288.)

Also

  • Corrected the evolution smoke-test timing: ~2.5 s, not ~4 s.
  • Verified every file and config path referenced across all seven skills still resolves. All do.
  • The other five skills are process guidance with no machine assumptions; left alone.

No chip or model names appear in the skills — the guidance is expressed as measured behaviour and thresholds.

🤖 Generated with Claude Code

Two skills carried performance guidance that was never measured on this machine.
Both are now backed by benchmarks run against the current stack, and the
corrections went in the opposite direction from what I expected.

nematode-run-evolution told sessions to divide wall-clock by the worker count:
"parallel 1 = 240 episodes ~ 24 s. With --parallel 4 ~ 6 s". The serial estimate
is good — measured 25.9 s — but the division is not. Real speedup saturates at
2.5-3x and is essentially reached by 6-8 workers: 800 MLPPPO episodes take 31.9 s
serial, 12.0 s at 6 workers, and 11.1 s at 18. Each generation is a barrier and
the optimiser step between them is serial, so extra workers buy fork overhead.
On small runs more workers are actively slower — 80 episodes cost 5.8 s at
--parallel 1 and 7.2 s at --parallel 18. The skill now carries the measured table,
recommends --parallel 8, and the example config uses 8 instead of 4. Per-episode
costs were re-measured and the old figures were close enough to keep: ~40 ms
MLPPPO, ~110 ms LSTMPPO.

nematode-run-experiments claimed "max 16 concurrent sessions — machine handles
this without degradation". Sixteen turns out to be right, but for a reason worth
writing down: it is where throughput peaks (~1.8 sessions/s, against 1.77 at 24
and 1.68 at 32), not a hard ceiling. Rounds needing six groups or six seeds can
use 24. The skill also implied memory might be the constraint; it is not, at
~0.5 GB per session, so a matrix should never be cut out of memory worry — only
because sessions compete for cores. Added thread pinning to the launch snippet,
which is worth ~6% throughput at 24 sessions and more above that.

Also corrected the evolution smoke-test timing (~2.5 s, not ~4 s) and verified
every file and config path referenced across all seven skills still resolves.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 29622650-548e-4975-a85f-9c3cddc41690

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@chrisjz
chrisjz merged commit 46b992a into main Aug 23, 2026
9 checks passed
@chrisjz
chrisjz deleted the chore/refresh-skills branch August 23, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant