Repository navigation
ci(smoke): persist every JAX compile in the smoke leg (threshold 0) - #222
Merged
Merged
Conversation
`smoke-tests.yml` restores and saves a JAX compilation cache but set no compile-time threshold, so autonerves' setdefault of 1s won and only executables that took over a second were ever written. The smoke scripts are hundreds of sub-second compiles each, so a "hit" cache held 1-4 entries and every run re-paid the compile. Export JAX_PERSISTENT_CACHE_MIN_COMPILE_TIME_SECS="0" in the runner step env, beside JAX_COMPILATION_CACHE_DIR, so every script subprocess inherits it. Measured locally on the three slowest JAX scripts: 23-31s -> 10-18s, 2->513 / 4->299 / 1->~490 entries, output byte-identical. The price is cache-artefact size (~3 MB per JAX script per python leg); rollback is this one line or a PYAUTO_CACHE_EPOCH bump. Wiring test pins the key and that the runner command is still untouched. Closes #221 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NWYEAsAsN5cfuqqBoYTHho
This was referenced Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #221 (Mind prompt
active/smoke_jax_cache_threshold.md).smoke-tests.ymlrestores and saves a JAX compilation cache but set no compile-time threshold, soautonerves/jax_wrapper.py'ssetdefaultofJAX_PERSISTENT_CACHE_MIN_COMPILE_TIME_SECS=1won and only executables that took over a second were ever persisted. The smoke scripts are hundreds of sub-second compiles each, so acache_jax: HITleg held 1–4 entries and every run re-paid the compile. This exportsJAX_PERSISTENT_CACHE_MIN_COMPILE_TIME_SECS: "0"in the runner step env, besideJAX_COMPILATION_CACHE_DIR, so every script subprocess inherits it.API Changes
None — one env key in the reusable workflow's runner step. The runner command is byte-identical (the wiring test pins it). No
PYAUTO_CACHE_EPOCHbump: the restore-keys prefix still matches today's entries and the next save is the superset.Measured (local, smoke profile, from the prompt)
imaging/jax_likelihood/delaunay.pymisc/jax_assertions/delaunay_nn.pyinterferometer/jax_likelihood/delaunay_mge.pyPrinted output diffed byte-identical across both regimes; the threshold governs which executables are persisted, not what is compiled.
The trade this PR asks a human to price (decision flagged)
The saved cache artefact grows by roughly ~500 entries / ~3 MB per JAX script, per workspace, per Python leg. Restore time scales with it. This lands in every workspace's gate the moment it is on
main(they call this workflow@main), and it cannot be measured before merge — Heart's own CI here runs only the wiring tests. Watch after merge: the board's per-repo[jax cache hit|miss]lines andcache_state.json'sjax_mb/jax_nbefore/after. Rollback: delete the one line, or bumpPYAUTO_CACHE_EPOCHto drop the fat caches.Follow-ups (not this PR)
profile_smoke.yaml: the three per-script overrides from/ci_speedup(2026-09-10) become redundant once this is onmain; harmless while they stay.lib-tests.yml(the libraries' unit gate) restores the same cache with the same missing threshold — a separate pricing.Tests
python3 -m pytest -q -n autoin PyAutoHeart: 966 passed. New:test_the_runner_persists_every_compile_it_makes.🤖 Generated with Claude Code
https://claude.ai/code/session_01NWYEAsAsN5cfuqqBoYTHho
Generated by Claude Code