Skip to content

Upgrade pytorch-lightning to 2.6.6 - #87

Merged
aaron-kumo merged 1 commit into
mainfrom
aaron/upgrade-pytorch-lightning
Oct 22, 2026
Merged

aaron-kumo merged 1 commit into
mainfrom
aaron/upgrade-pytorch-lightning

Conversation

@aaron-kumo

@aaron-kumo aaron-kumo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

pytorch-lightning 2.6.5 is affected by CVE-2026-58659 (GHSA-qqmf-gpg7-g8gw, high): a crafted checkpoint can run arbitrary code through load_from_checkpoint, even with weights_only=True. 2.6.6 fixes it. kumo never calls load_from_checkpoint, but kumo-core pins pytorch-lightning==2.6.5 exactly, so every kumo-engine 1.0.0 install carries a version that scanners flag and that users can't upgrade themselves.

This PR moves every pin to ==2.6.6, with no code changes. The only code change between 2.6.5 and 2.6.6 is that fix, and Lightning's dependencies are unchanged.

Change map

File-by-file change map.

Testing Done

  • A model bundle trained under 2.6.5 reloads under 2.6.6 and predicts identically.

Checklist

  • Breaking changes: none.
  • Updated documentation: not needed.
  • Updated the wheel metadata test.

## Summary

Move every `pytorch-lightning` pin from `==2.6.5` to `==2.6.6`. OSV lists 2.6.5 as affected by PYSEC-2026-3967 (CVE-2026-58659, GHSA-qqmf-gpg7-g8gw) and reports no advisories for 2.6.6. The published kumo-engine 1.0.0 wheel requires `pytorch-lightning==2.6.5`, so the next release needs the new pin. Dependency-only; no code changes.

## Technical details

- The `kumo-core` runtime dependency and the root `test`/`dev` extras stay exact and identical, so installing the platform alongside `kumo-core` remains satisfiable.
- `uv.lock` was updated with `uv lock --upgrade-package pytorch-lightning`. The diff is the three specifier lines plus the `pytorch-lightning` entry's version, sdist and wheel; its dependency list is unchanged and no other package moved.
- Upstream, the only code change between 2.6.5 and 2.6.6 is the `load_from_checkpoint` hardening in `pytorch_lightning/core/saving.py`, which kumo does not call. Checkpoint IO goes through `lightning_fabric.utilities.cloud_io._load`, which is byte-identical. The base `Requires-Dist` set and `Requires-Python` are unchanged.
- The kumo-core wheel metadata test now expects `==2.6.6`; `merge_wheels.py` copies kumo-core's requirements into the kumo-engine wheel.

## Testing strategy

All runs were CPU-only, after asserting that the venv had `pytorch-lightning` 2.6.6 installed (synced as `scripts/update_packages.sh` does):

- `uv lock --check` passed.
- kumo-core suite: 6604 passed, 12 skipped (CUDA, live-tier, fast-run).
- Root Lightning consumers (`test_stopper`, `test_diskgraph_lightning_data`, `test_explainer`): 124 passed.
- kumo-engine suite, from source on `PYTHONPATH`: 528 passed, 10 skipped (live connector credentials).
- A bundle trained through `kumo.engine` under 2.6.5 reloaded and predicted under 2.6.6, with predictions exactly equal to those from 2.6.5. A fresh fit, reload and predict under 2.6.6 also passed.
- All five `gen_third_party.py --check` commands and the focused generator unit tests passed; the notice inventories do not record the Lightning version.
@aaron-kumo

Copy link
Copy Markdown
Collaborator Author

Change map

  • Release requirement: OSV lists pytorch-lightning 2.6.5 as affected by CVE-2026-58659 and 2.6.6 as fixed. The kumo-engine 1.0.0 wheel requires pytorch-lightning==2.6.5.
  • Existing behavior: kumo-core and the root test extras pin ==2.6.5.
  • Smallest sufficient change: move both exact pins to ==2.6.6 and update the lock.
  • Verification: see Testing Done.
  • Stopping condition: no pin or lock entry references 2.6.5, and the kumo-core and kumo-engine suites pass.
File Function / scope What changed Why
packages/kumo-core/pyproject.toml [project] dependencies pytorch-lightning==2.6.6. Security fix. merge_wheels.py copies kumo-core's requirements into the kumo-engine wheel.
setup.py test_requires pytorch-lightning==2.6.6. Must match kumo-core's exact pin, or the two conflict.
packages/kumo-core/tests/test_wheel_metadata.py Wheel requirement expectations Expects ==2.6.6. Follows the pin.
uv.lock pytorch-lightning entry and its three specifiers 2.6.6 sdist and wheels. uv lock --upgrade-package pytorch-lightning; no other package moved.

@copy-pr-bot

copy-pr-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@aaron-kumo
aaron-kumo temporarily deployed to gha-kumo-workflow-tests October 21, 2026 20:42 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between bdb6294 and 25b5524.

⛔ Files ignored due to path filters: 1
  • uv.lock is excluded by !**/*.lock, !**/*.lock
📒 Files selected for processing: 3
  • packages/kumo-core/pyproject.toml
  • packages/kumo-core/tests/test_wheel_metadata.py
  • setup.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

📝 Walkthrough

The pytorch-lightning dependency pin changes from 2.6.5 to 2.6.6 in the package and test requirements. The wheel metadata test now expects version 2.6.6.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 25b55

The dependency update is internally consistent and ready to merge.

Pre-merge checks: Passed 3
Check name Status Explanation
Change Map Design Review Passed The change map matches a necessary, minimal dependency-layer update. The diff changes only four relevant files: the kumo-core runtime pin, the root test pin, the wheel metadata expectation, and uv.loc…
Pr Size Passed The pull request changes 4 files: packages/kumo-core/pyproject.toml, packages/kumo-core/tests/test_wheel_metadata.py, setup.py, and uv.lock. The count does not exceed 40.
Public Resource Access Passed The pull request modifies two external package artifact URLs in uv.lock (lines 5927 and 5929) for pytorch-lightning==2.6.6. Anonymous HEAD requests returned HTTP 200 for both files.pythonhosted.or…
Full details: Change Map Design Review

Explanation

The change map matches a necessary, minimal dependency-layer update. The diff changes only four relevant files: the kumo-core runtime pin, the root test pin, the wheel metadata expectation, and uv.lock. All reviewed pins and lock entries move from 2.6.5 to 2.6.6, and no 2.6.5 reference remains at the reviewed head. The repository has no call to load_from_checkpoint; its separate trusted Kumo checkpoint loader is unchanged, which preserves existing checkpoint behavior. The supplied PR context reports lock validation, focused consumer and package suites, and cross-version bundle reload checks, with a stopping condition of no remaining 2.6.5 pin or lock entry.

Full details: Public Resource Access

Explanation

The pull request modifies two external package artifact URLs in uv.lock (lines 5927 and 5929) for pytorch-lightning==2.6.6. Anonymous HEAD requests returned HTTP 200 for both files.pythonhosted.org URLs. No other added or modified external resource reference is present.

✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@aaron-kumo
aaron-kumo marked this pull request as ready for review October 22, 2026 18:53
@aaron-kumo
aaron-kumo requested a review from anle2024 October 22, 2026 18:54
@aaron-kumo
aaron-kumo merged commit 836d875 into main Oct 22, 2026
124 of 127 checks passed
@aaron-kumo
aaron-kumo deleted the aaron/upgrade-pytorch-lightning branch October 22, 2026 21:51
anle2024 added a commit that referenced this pull request Nov 4, 2026
## Summary

Backport the dependency security fixes to `releases/v1.0` and prepare
Kumo Engine 1.0.1 from the released 1.0.0 base. The patch updates
Lightning to 2.6.6 and carries PR172's native dependency fixes while
preserving the saved-index format.

PR45 supplies the GPU status required by release-branch protection.
Generated dependency records describe this release branch. The version
stamp updates the shared metadata. Copied-source policy preserves
upstream headers and continues checking NVIDIA additions.

## Change map

[Maintained file-by-file change
map](#190 (comment)).

## Testing Done

- Built the Linux x86_64 1.0.1 wheel on glibc 2.34 with Rust 1.97.1.
SHA-256:
`0ead83aa11d84b595b5ae3da28995665ff04a7db263a5b5af436c02d34232f12`.
- All eight CUDA task checks passed on a Tesla T4 with Torch 2.12.0 and
again with a fresh Python 3.12 / Torch 2.13.0 environment. Both
environments used Lightning 2.6.6. Installed code matched the candidate
wheel in all 379 Python/native files.
- The short GPU check trained, saved, and reloaded a model. Loading an
original Engine 1.0.0 model and reloading the new model both preserved
predictions exactly in both environments.
- The copied library passed 89 checks. The full Rust workspace suite
passed with isolated tmpfs temporary storage. The inherited
`disk_manager::tests::test_eviction_under_real_disk_pressure` fails on
this machine's SSD and passes on tmpfs. All eight frozen-index checks
also passed on x86_64.
- Header-policy, Python license metadata, notice-generator, core wheel
metadata, generated artifact, and version checks passed. All seven
installation profiles resolve from PyPI for Python 3.11 through 3.14.
- Trivy 0.72.0 reported zero findings in the resolved Rust dependency
graph and the fresh installed Python requirements with Torch 2.13.0, pip
26.3, and setuptools 84.2.1. The earlier Torch 2.12 / old packaging-tool
environment had lower-severity findings. The wheel's allowed dependency
ranges remain unchanged apart from Lightning. Upgrading Engine alone
does not force an existing Torch 2.12 environment to upgrade; the
zero-finding Python result applies to the stated tested dependency
versions.

These are small compatibility checks. Learning quality, production load,
and every allowed dependency combination are not qualified. PLC review,
the final release build, and publication remain separate.

## Hotfix Context

Original security PRs:
[PR87](#87) and
[PR172](#172).

Required CI support:
[PR45](#45).

Target release branch: `releases/v1.0`, based on
`7d65608b8b697d3865dbbaacc1bc1f26b7760a2a`.

---------

Co-authored-by: Aaron Braunstein <[email protected]>

This branch was previously deployed

1 inactive deployment
gha-kumo-workflow-tests — 25b5524f Deployed Oct 21, 2026 by aaron-kumo via import #396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants