Skip to content

feat: add activate.sh + switch submit to PyAuto + PYTHONPATH model#35

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/activate-sh-and-nss
May 28, 2026
Merged

feat: add activate.sh + switch submit to PyAuto + PYTHONPATH model#35
Jammy2211 merged 1 commit into
mainfrom
feature/activate-sh-and-nss

Conversation

@Jammy2211
Copy link
Copy Markdown
Contributor

Summary

Adopts the project-activate.sh pattern already used by `z_projects/euclid` and `autolens_assistant`. The pip side handles only third-party deps; PyAuto* libraries resolve via PYTHONPATH from the canonical source trees at `/mnt/ral/jnightin/PyAuto/` that `HPCPullPyAuto` keeps current.

After this PR:

```bash
HPCPullPyAuto # source trees update
sbatch submit_imaging_mge_a100_hst_fp64 # submit sources $AP_ROOT/activate.sh
# activate.sh: PyAuto venv + PYTHONPATH
# imports resolve to current main
```

No pip install of PyAuto* into the venv, ever.

PyAutoNSS is no longer a hard dependency. PyAuto venv already carries everything the submits need (nautilus, blackjax fork, nss, fastprogress, jax_zero_contour, jax 0.4.38).

Test plan

  • PyAuto venv smoke: `source activate.sh && python3 -c "import autolens; ..."` → 2026.5.21.1, `af.NSS` exposed, latent module present.
  • Resubmit the A100 cell via the new submit script — confirm `autolens 2026.5.21.1` appears in the metric JSON `"version"` field.

🤖 Generated with Claude Code

PyAuto* libraries are source trees on the HPC at /mnt/ral/jnightin/PyAuto/
that HPCPullPyAuto keeps current. Editable / non-editable pip installs into
a venv just duplicate that — and lock you to whatever was on main when you
last reinstalled. The correct pattern, already used by z_projects/euclid
and autolens_assistant, is:

  - venv (PyAuto) carries only third-party deps (jax, nautilus, blackjax,
    nss, fastprogress, jax_zero_contour, anesthetic, numpy, ...).
  - PYTHONPATH points at the canonical source trees; import autolens etc.
    resolves there, picking up whatever HPCPullPyAuto last pulled.

Adds autolens_profiling/activate.sh in the same shape, and switches the
A100 search submit script to ``source $AP_ROOT/activate.sh`` instead of
sourcing PyAutoNSS's venv directly. PyAutoNSS is no longer a hard
dependency for these submits — PyAuto's site-packages already carry
nautilus, the handley-lab blackjax fork, nss, fastprogress, and
jax_zero_contour (installed today as the last missing pieces), and
PYTHONPATH gives us current autofit/autolens/autogalaxy/autoarray/autoconf.

Future updates are a one-liner: ``HPCPullPyAuto``. No pip install of
PyAuto* into the venv, ever.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit f837fa9 into main May 28, 2026
1 check failed
@Jammy2211 Jammy2211 deleted the feature/activate-sh-and-nss branch May 28, 2026 16:18
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