From b2698725d6ad63cf288abb617ffad4bc288e5c14 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 3 Aug 2026 22:05:37 +0000 Subject: [PATCH] fix: install autoarray[optional] in the workspace-validation smoke leg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The nightly Workspace Smoke run (which is a thin caller of this workflow with mode=smoke) went red on two scripts with: ImportError: To use the JAX backend with the Matern kernel, install the tensorflow-probability nightly via `pip install tfp-nightly==...` autogalaxy_workspace_test scripts/misc/jax_assertions/matern_regularization.py autolens_workspace_test scripts/imaging/jax_grad/regularization.py Both scripts are correct and both PASS mode=release, which installs autoarray[optional]==$VERSION explicitly — and PyAutoArray declares tfp-nightly there. The two modes run the same script matrix; only the install differs, so this was purely an install-set gap. Root cause: the `optional` extras chain each library's own [jax], never a sibling's [optional] — autolens[optional] -> autolens[jax] -> autogalaxy[jax] -> autofit[jax] -> autonerves[jax]. So members of autoarray[optional] are never reached and must be hand-added to the smoke leg, exactly as nufftax and autofit[optional] already are. Install the whole autoarray[optional] extra rather than pinning tfp-nightly alone so a future addition to that extra is covered without another one-off line. Skip-guarding or parking the scripts was rejected: parking also skips them in mode=release, destroying the PyAutoArray #385 regression guard that matern_regularization.py exists to provide. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_016FceDqU3q1PRWrqN42R2p1 --- .github/workflows/workspace-validation.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/workspace-validation.yml b/.github/workflows/workspace-validation.yml index 4f0fcaf..e2a2d20 100644 --- a/.github/workflows/workspace-validation.yml +++ b/.github/workflows/workspace-validation.yml @@ -244,6 +244,17 @@ jobs: # reaches autofit[optional]. mode=release below already installs # autofit[optional] explicitly — this gives the smoke leg parity. pip install "autofit[optional]" + # Same gap, same rationale, for autoarray's own [optional]: it carries + # tfp-nightly, which supplies the modified-Bessel `bessel_kve` behind + # the JAX Matern-kernel regularization path + # (autoarray/inversion/regularization/matern_kernel.py). Without it + # autogalaxy_workspace_test's misc/jax_assertions/matern_regularization.py + # and autolens_workspace_test's imaging/jax_grad/regularization.py fail + # at import — red here while PASSING mode=release, which installs + # autoarray[optional] explicitly (below). Installing the whole extra + # rather than pinning tfp-nightly alone keeps a future addition to + # autoarray[optional] covered without another one-off line here. + pip install "autoarray[optional]" - name: "Install TestPyPI wheels — NO source on PYTHONPATH [mode=release]" if: needs.find_scripts.outputs.mode == 'release' env: