Skip to content

Prefer fit_quick.png in quick-update display candidates #21

Prefer fit_quick.png in quick-update display candidates

Prefer fit_quick.png in quick-update display candidates #21

name: NSS install smoke
# Phase 4 of nss_first_class_sampler — verifies that the documented two-step
# install (`pip install autofit[nss]` followed by the manual `pip install
# git+...` for the handley-lab/blackjax fork and yallup/nss) lands a working
# NSS environment.
#
# Why two steps: PyPI bans `git+https://` URLs in uploaded wheel metadata
# (rejection: "400 Can't have direct dependency"), so the fork-based deps
# cannot live in pyproject.toml's [nss] extra. The SHAs themselves are
# documented in PyAutoFit/pyproject.toml just above the [nss] entry — keep
# the two in sync.
#
# Runs on every PR (so we catch local regressions in pyproject.toml or in
# the documented manual install before merging) and on a weekly cron (so we
# catch upstream regressions in handley-lab/blackjax or yallup/nss that
# drift past the pinned SHAs).
on:
pull_request:
schedule:
# Sundays at 03:00 UTC — quiet hours, catches upstream drift weekly.
- cron: '0 3 * * 0'
jobs:
fresh_venv_install:
name: Fresh-venv install of autofit[nss]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout PyAutoConf
uses: actions/checkout@v4
with:
repository: PyAutoLabs/PyAutoConf
path: PyAutoConf
- name: Checkout PyAutoFit
uses: actions/checkout@v4
with:
path: PyAutoFit
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install PyAutoConf
run: python -m pip install -e PyAutoConf
- name: Install PyAutoFit with [nss] extra
run: python -m pip install -e PyAutoFit[nss]
- name: Install handley-lab/blackjax and yallup/nss (manual, post-extras)
# Mirrors the documented two-step install path. Keep these SHAs in
# sync with the block at the top of PyAutoFit/pyproject.toml's [nss]
# comment — that's the single source of truth.
run: |
python -m pip install \
"blackjax @ git+https://github.com/handley-lab/blackjax.git@ef45acd2f2fa0cca15adbdcd3ff7cb3a98987cb5" \
"nss @ git+https://github.com/yallup/nss.git@69159b0f4a3a53123b9eec7df91e4ed3885e4dc4"
- name: Import smoke
run: |
python -c "
import autofit as af
import nss.ns
import blackjax
# Confirm the right blackjax fork landed (mainline does not have
# blackjax.ns.adaptive — this attribute access is the canonical
# check for the handley-lab fork).
import blackjax.ns.adaptive
assert hasattr(blackjax.ns.adaptive, 'init'), (
'blackjax.ns.adaptive.init missing — wrong blackjax installed?'
)
# Confirm af.NSS instantiates without ImportError.
search = af.NSS(n_live=10, num_mcmc_steps=2, num_delete=5, termination=-1.0)
assert search.checkpoint_interval == 100
print('NSS install smoke: OK')
print(f' blackjax version: {blackjax.__version__}')
print(f' nss installed at: {nss.__file__}')
"