Skip to content

research: JAX version policy hang-matrix scripts (PyAutoNerves#213) - #527

Merged
Jammy2211 merged 8 commits into
mainfrom
feature/jax-version-policy
Nov 11, 2026
Merged

Jammy2211 merged 8 commits into
mainfrom
feature/jax-version-policy

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

These are the research scripts for PyAutoLabs/PyAutoNerves#213. They test which jax versions and XLA:CPU flags avoid the deadlock where a compiled likelihood stops for good on CPU (0 % CPU, futex wait). A parent process launches each grid cell in a separate child. The child calls a reproducer many times in a process that imports only jax, and a stall with no CPU work is recorded as a hang.

Results: on RAL (job 415009, 600 cells, 180,000 calls), jax 0.11.2 with no flag hung in 25/25 cells at 4 cores. jax 0.12.0 and 0.12.0.1 passed every cell. The recommendation is in PyAutoDNA decisions/jax-cpu-policy-2026-11.md.

Scripts Changed

  • scripts/misc/jax_version_policy/hang_case.py — new: one cell, pure jax (fft, lapack, or an exported module), with a line-by-line progress protocol.
  • scripts/misc/jax_version_policy/library_case.py — new: the same protocol through the real library, for Delaunay (its host callback cannot be exported).
  • scripts/misc/jax_version_policy/run_matrix.py — new: drives version × flag × case × repeat, detects stalls and samples CPU, and pins cores within the process's affinity.
  • scripts/misc/jax_version_policy/export_reproducers.py — new: saves the 2d group / multi_galaxy likelihoods with jax.export.
  • scripts/misc/jax_version_policy/make_venvs.sh — new: one throwaway venv per jax version.
  • scripts/misc/jax_version_policy/README.md — new.
  • hpc/batch_cpu/submit_jax_version_policy_hang_matrix_ral_cpu — new: the 40-task ral array, using the base CPython read-only.
  • dashboard/catalogue/setups.json — regenerated (4 new navigation entries).

Test Plan

  • ruff check, ruff format --check, build_readme --check, build_catalogue --check --validate-with PyAutoPulse, parity and gradient witnesses
  • Laptop pilot (2026-11-10) and RAL 415009 ran these scripts end to end; rows were imported into PyAutoDNA

Heart was RED when this task started (development override recorded on PyAutoNerves#213) and was YELLOW at ship; the human acknowledged it on 2026-11-11. The red items are in repos this PR does not touch. Merge via human /prm.

🤖 Generated with Claude Code

Jammy2211 and others added 7 commits November 10, 2026 18:02
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…set (PyAutoNerves#213)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…interpreter

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…4969: /usr/bin/python3.12 absent on compute nodes)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ly (private copy too slow over NFS)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…loadable, not error

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ves#213)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the hang-matrix stall watchdog as not a timing gate

build_dashboard --check (committed stamp + revision) now reports current; list_timing_assertions --check OK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit a66136c into main Nov 11, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the feature/jax-version-policy branch November 11, 2026 13:07
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