Skip to content

fix(ci): pin pip <26.1 in Tiny AI workflow (lightning regression)#231

Merged
lusoris merged 2 commits intomasterfrom
fix/pip-pin-tiny-ai
Apr 30, 2026
Merged

fix(ci): pin pip <26.1 in Tiny AI workflow (lightning regression)#231
lusoris merged 2 commits intomasterfrom
fix/pip-pin-tiny-ai

Conversation

@lusoris
Copy link
Copy Markdown
Owner

@lusoris lusoris commented Apr 30, 2026

Summary

Six-deliverable checklist (ADR-0108)

  • Research digest — no digest needed: trivial (1-line CI workaround for an external pip resolver regression; mechanism documented inline in the workflow comment + commit body).
  • Decision matrix — no alternatives: only-one-way fix (the only narrow mitigation is to pin pip below the broken release; pinning lightning in ai/pyproject.toml does not work around the resolver bug).
  • AGENTS.md invariant note — no rebase-sensitive invariants (CI workflow patch only; nothing rebase-relevant about a temporary version pin).
  • Reproducer / smoke-test command — pasted below under "Reproducer".
  • CHANGELOG.md — no changelog needed: CI-only change with no user-visible behavior delta. Per ADR-0100 §Per-surface minimum bars, infra-only patches don't ship CHANGELOG entries.
  • Rebase note — no rebase impact: CI-only change against the fork's own workflow, doesn't intersect upstream Netflix/vmaf paths.

Reproducer

Failing path (current master, after pip 26.1 release):

python3 -m venv /tmp/venv
/tmp/venv/bin/pip install --upgrade pip
/tmp/venv/bin/pip install -e ai
# ERROR: Could not find a version that satisfies the requirement lightning<3.0,>=2.5
# ERROR: No matching distribution found for lightning<3.0,>=2.5

Fixed path (this PR):

python3 -m venv /tmp/venv
/tmp/venv/bin/pip install --upgrade 'pip<26.1'
/tmp/venv/bin/pip install -e ai
# resolves lightning-2.6.1 cleanly

Test plan

Notes

No ai/pyproject.toml change — lightning>=2.5,<3.0 is a valid constraint that pip ≤25.x and pip ≥26.2 (once shipped) should resolve. This is a CI-infra mitigation, not a dep change.

Lusoris and others added 2 commits April 30, 2026 19:02
…ression

pip 26.1 (released 2026-04-30) regresses transitive resolution for
`lightning>=2.5,<3.0` and fails the `pip install -e ai` step in the
Tiny AI workflow with:

  ERROR: Could not find a version that satisfies the requirement
         lightning<3.0,>=2.5 (from vmaf-train) (from versions: none)

This blocks every PR's Tiny AI gate. Concrete cases observed:

- PR #213 same-SHA reruns: 12:41 UTC pass (pip 24.0) → 15:54 UTC fail
  (pip 26.1, after `pip install --upgrade pip` pulled the new release).
- PR #229 yesterday: passed with pip 24.0, lightning-2.6.1 resolved
  cleanly.

The PR diff itself doesn't touch `ai/`, so this is purely an upstream
pip regression breaking a working workflow.

Pin to `pip<26.1` in the Tiny AI venv until pip ships a fix. Other
workflows that don't depend on `lightning` resolution are left alone
to keep this change narrow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ghtning

Initial pin `pip<26.1` was insufficient: pip 26.0.1 has the same
"No matching distribution for lightning<3.0,>=2.5" regression as 26.1.
Verified on this PR's own run (job 73817357146): venv installed
pip-26.0.1 (under 26.1), then `pip install -e ai` failed identically.

The runner image ships pip 24.0 pre-installed (PR #229 baseline,
2026-04-29, succeeded). Drop the `--upgrade pip` line so the venv
inherits 24.0 and skips the broken 26.x release entirely. Re-introduce
the upgrade once a pip release lands that resolves lightning correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lusoris lusoris merged commit dd0a4fb into master Apr 30, 2026
52 of 53 checks passed
@lusoris lusoris deleted the fix/pip-pin-tiny-ai branch April 30, 2026 17:36
@github-actions github-actions Bot mentioned this pull request Apr 30, 2026
lusoris added a commit that referenced this pull request Apr 30, 2026
* fix(ai): switch lightning → pytorch-lightning (PyPI 404)

Lightning AI un-published the `lightning` distribution from PyPI on
2026-04-30. Verified:

  $ curl -sSI https://pypi.org/pypi/lightning/json
  HTTP/2 404
  $ curl -sSI https://pypi.org/pypi/pytorch-lightning/json
  HTTP/2 200    # version 2.6.1 — same wheel that pip resolved yesterday

Yesterday's PR #229 successfully downloaded `lightning-2.6.1-py3-none-any.whl`;
today every PR's Tiny AI gate fails with "No matching distribution found
for lightning<3.0,>=2.5 (from versions: none)" — the resolver is correctly
reporting the 404. PR #231's earlier `pip<26.1` pin was treating a
misdiagnosis (pip resolver bug); the pin is harmless but unnecessary now
and will be dropped in a follow-up.

`pytorch-lightning >= 2.0` ships both `import lightning` and
`import pytorch_lightning` entry points, so `import lightning as L` in
ai/src/vmaf_train/{datamodule,train,models/*}.py and the train scripts
continues to work without source changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(ai): migrate `import lightning` → `import pytorch_lightning`

The previous commit on this branch swapped the PyPI distribution name
(`lightning>=2.5,<3.0` → `pytorch-lightning>=2.5,<3.0`) under the
incorrect assumption that pytorch-lightning ships both the
`pytorch_lightning` and `lightning` import namespaces. CI proved
otherwise: pytest collection errors on this branch with
`ModuleNotFoundError: No module named 'lightning'` from
ai/tests/test_export_roundtrip.py and ai/tests/test_registry.py
(import-side test discovery; these import from vmaf_train).

The pytorch-lightning distribution only exposes `pytorch_lightning`
as a top-level import. The `lightning` shim was an exclusive of the
now-404 `lightning` distribution.

Migrated all six call sites:
  ai/src/vmaf_train/datamodule.py
  ai/src/vmaf_train/train.py            (also `lightning.pytorch.callbacks`
                                         → `pytorch_lightning.callbacks`)
  ai/src/vmaf_train/models/fr_regressor.py
  ai/src/vmaf_train/models/nr_metric.py
  ai/src/vmaf_train/models/learned_filter.py
  ai/scripts/train_konvid.py            (same callbacks rename)

API surface is unchanged — pytorch_lightning >= 2.0 has the same
LightningModule / LightningDataModule / Trainer / callbacks API as
the lightning distribution did. Updated the pyproject comment to
reflect the namespace reality.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Lusoris <lusoris@pm.me>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lusoris pushed a commit that referenced this pull request May 1, 2026
PR #231 pinned `pip<26.1` under the assumption that pip 26.x had a
resolver regression breaking `lightning>=2.5,<3.0` lookup. Confirmed
in #232 that the actual root cause was Lightning AI un-publishing the
`lightning` distribution from PyPI on 2026-04-30 — pip was correctly
reporting a 404. PR #232 swapped the dep to `pytorch-lightning` and
the gate is green again.

The pin is therefore harmless cruft. Restore the `--upgrade pip` step
so the venv tracks the latest pip, matching the convention in every
other workflow in this repo.

No functional change beyond removing the diagnostic comment block.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lusoris added a commit that referenced this pull request May 1, 2026
PR #231 pinned `pip<26.1` under the assumption that pip 26.x had a
resolver regression breaking `lightning>=2.5,<3.0` lookup. Confirmed
in #232 that the actual root cause was Lightning AI un-publishing the
`lightning` distribution from PyPI on 2026-04-30 — pip was correctly
reporting a 404. PR #232 swapped the dep to `pytorch-lightning` and
the gate is green again.

The pin is therefore harmless cruft. Restore the `--upgrade pip` step
so the venv tracks the latest pip, matching the convention in every
other workflow in this repo.

No functional change beyond removing the diagnostic comment block.

Co-authored-by: Lusoris <lusoris@pm.me>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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