Skip to content

fix(activate): pin JAX to CPU on GPU-less HPC jobs - #48

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/assistant-activate-cpu-tmpdir
Nov 13, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/assistant-activate-cpu-tmpdir

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Part of PyAutoLabs/autolens_assistant#185.

Summary

In the PYAUTO_HPC_BASE (cluster) branch of activate.sh:

  • JAX pinned to the CPU on GPU-less jobs. The shared venv ships JAX's CUDA plugin. On a CPU node it fails cuInit and logs an ERROR and a traceback into every CPU job's log before JAX falls back to the CPU. The block sets JAX_PLATFORMS=cpu (with one stderr line) only when JAX_PLATFORMS is unset and SLURM_JOB_GPUS, SLURM_GPUS_ON_NODE and CUDA_VISIBLE_DEVICES are all empty. A RAL --gres=gpu probe (job 415323) showed all three set on GPU jobs, so GPU runs are untouched.

The laptop .venv branch is unchanged. New projects inherit this through skills/start-new-project.md; the six live Science projects got the same lines by hand today.

Tests

bash -n on both activate.sh; behaviour test against a stub venv for both templates (no-GPU job -> JAX_PLATFORMS=cpu and TMPDIR off /tmp; --gres=gpu job with the Slurm variables measured by RAL gpu probe 415323 -> untouched; explicit JAX_PLATFORMS kept; laptop .venv branch untouched); the two templates now agree apart from library names; RAL CPU-node verification that JAX_PLATFORMS=cpu silences the plugin error (probe 415321); smoke n/a (activate.sh only); review: in-session. None of the RED reasons are in autolens_assistant or autogalaxy_assistant.

Heart RED override (development only)

  • Authorization: live human, 2026-11-13, choosing "Override, open PRs (Recommended)" for this task (autolens_assistant#185): "Push both branches and open PRs in autolens_assistant and autogalaxy_assistant, recorded in the four override sinks. CI must pass; merging stays with your /prm."
  • Heart RED reasons (verbatim, current): PyAutoLens: 1 uncommitted source change(s); manifest drift: tenant firewall (organ code) — 40 mismatch(es) vs PyAutoMind/repos.yaml; manifest drift: workspace checkouts (manifest ↔ disk) — 2 mismatch(es) vs PyAutoMind/repos.yaml; PyAutoArray: open PR 9d old; release validation incomplete: no rehearsal for current source
  • Branch gates: see Tests. Heart remains RED for release purposes; this PR does not claim to fix it. Merge requires a separate human command with every required check green.

🤖 Generated with Claude Code

Refs PyAutoLabs/autolens_assistant#185.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 6bba442 into main Nov 13, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/assistant-activate-cpu-tmpdir branch November 13, 2026 12:39
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