Skip to content

ci: split NSS tests into parallel job (handley-lab blackjax fork ≠ mainline)#1281

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/ci-install-nss-extras
May 17, 2026
Merged

ci: split NSS tests into parallel job (handley-lab blackjax fork ≠ mainline)#1281
Jammy2211 merged 1 commit into
mainfrom
feature/ci-install-nss-extras

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented May 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

PyAutoFit's Tests workflow on main has been red since 2026-05-16 09:48 UTC, the moment PR #1277 ("feat: autofit[nss] install extra") merged. The 12 tests under test_autofit/non_linear/search/nest/nss/ hit the script's own ImportError guard on af.NSS() because the CI install step only installs [optional].

Why "just add [nss] to [optional]" doesn't work

First attempt (single pip install ./PyAutoFit[optional,nss]) hit ResolutionImpossible — see run #25999018708. Both extras pin blackjax but to incompatible versions:

Extra blackjax pin
[optional] >=1.2.0 (mainline, PyPI)
[nss] git+https://github.com/handley-lab/blackjax.git@ef45acd2 (≈ 0.1.0b1.dev85)

The fork carries blackjax.ns.adaptive.init (mainline 1.2.x lacks it), so it's not "use the older one" — they're genuinely incompatible. pip rightly refuses to resolve both at once.

Resolution: split into parallel jobs

  • unittest: installs [optional] and runs the full test suite EXCLUDING test_autofit/non_linear/search/nest/nss/. Keeps test_blackjax_nuts.py (mainline blackjax) green.
  • unittest_nss (new): installs [nss] alone in a fresh env and runs ONLY the NSS test suite. Matrix is Python 3.12 / 3.13 to match the main unittest job.

Both jobs must pass for Tests to be green. The existing nss_install_smoke.yml workflow stays as the weekly-cron upstream-drift canary on the [nss] git pins; this new job is the PR/push-time test gate.

…inline)

The Tests workflow has been red on `main` since 2026-05-16 09:48 UTC,
the moment PR #1277 merged the `autofit[nss]` install extra. The 12
tests under `test_autofit/non_linear/search/nest/nss/` hit the script's
own ImportError guard on `af.NSS()` because the CI install step only
installs `[optional]`.

A naïve fix (combine `[optional,nss]` into one pip install) hit a real
dependency conflict — both extras pin `blackjax` but to different
versions:

  - [optional] pins `blackjax>=1.2.0` (mainline, PyPI)
  - [nss]      pins handley-lab fork @ ef45acd2 (~0.1.0b1.dev85+)

The fork carries the `blackjax.ns.adaptive.init` entrypoint that
mainline 1.2.x lacks, so it's not a "use the older one" merge — they're
genuinely incompatible. pip rightly refuses `[optional,nss]` with
`ResolutionImpossible`.

Resolution: split into parallel jobs.

- `unittest`: installs `[optional]` and runs the full test suite
  EXCLUDING `test_autofit/non_linear/search/nest/nss/`. This keeps
  `test_blackjax_nuts.py` (which requires mainline blackjax 1.2+) green.
- `unittest_nss` (new): installs `[nss]` alone in a fresh env and runs
  ONLY the NSS test suite. Matrix is python 3.12 / 3.13 to match
  the main `unittest` job.

Both jobs need to pass for the `Tests` workflow to be green. The
existing `nss_install_smoke.yml` workflow stays as the weekly-cron
upstream-drift canary on the [nss] git pins; this new job is the
PR/push-time test gate.

Fixes the failing Tests check observed on runs 25958838630 (#1277
merge), 25959492149 (#1278 merge), 25998822676 (#1280 revert merge),
and 25999018708 (the first attempt at this fix that revealed the
extras conflict).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Jammy2211 Jammy2211 force-pushed the feature/ci-install-nss-extras branch from e5b4718 to 4f85310 Compare May 17, 2026 18:28
@Jammy2211 Jammy2211 changed the title ci: install [nss] extra so NSS test suite passes May 17, 2026
@Jammy2211 Jammy2211 merged commit 95e340e into main May 17, 2026
7 checks passed
@Jammy2211 Jammy2211 deleted the feature/ci-install-nss-extras branch May 17, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant