Skip to content

ci: lock third-party deps when rendering notebooks - #5

Merged
Mr-Milk merged 3 commits into
mainfrom
ci/lock-third-party-deps
Oct 3, 2026
Merged

Mr-Milk merged 3 commits into
mainfrom
ci/lock-third-party-deps

Conversation

@Mr-Milk

@Mr-Milk Mr-Milk commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Summary

The notebook render has been red on main since July (last green: June 19). Two causes:

In the last run before this PR (#4, log), 11 of 12 notebooks failed:

Notebooks Error Cause
7 RuntimeError: operator torchvision::nms does not exist wsidata main pointed Linux torch at the PyTorch CPU index (wsidata#69), and uv applies that to git installs. So this repo got torch==2.14.0+cpu next to PyPI's torchvision==0.29.0. Fixed upstream in wsidata#76.
3 AttributeError: 'NoneType' object has no attribute 'lower' in spatialdata/_core/validation.py newer spatialdata
2 KeyError: 'wsi:Pathology Categories' also drift; gone with the lock

Changes

  • build_notebooks.yaml: uv sync --dev --upgrade-package lazyslide --upgrade-package wsidata --upgrade-package lazyslide-models. The three in-house packages still track main. Everything else comes from uv.lock, at the set from the last green render (torch 2.12.1, torchvision 0.27.1, spatialdata 0.7.2).
  • pyproject.toml: add deepspotm from git, the same way conch is declared. The lock only gains deepspotm and peft.
  • uv.lock: re-locked with only the in-house packages upgraded (wsidata is now at d797633, which includes #76).

An earlier commit here had a torch override as a workaround for wsidata#69. It was removed again once wsidata#76 landed.

To bump third-party deps, run uv lock --upgrade (or --upgrade-package <name>) in a PR, and the render on that PR tests the bump.

Checks

  • First render on this PR (log): torch==2.12.1 and torchvision==0.27.1 (no +cpu), spatialdata==0.7.2. 11 of 12 notebooks passed. The only failure was gene_expression_prediction: ModuleNotFoundError: No module named 'deepspotm', which the deepspotm commit fixes.
  • Locally, uv lock --locked passes, the lock has no download.pytorch.org entries, and from lazyslide_models.tile_prediction import DeepSpotM imports.
  • The render for the latest push is running.

After this lands

The render ran `uv sync --dev --upgrade`, so every run re-resolved all
~300 packages and auto-committed the new lock. Since July this broke
most notebooks:

- wsidata main (#69) sends Linux torch to the PyTorch CPU index, and uv
  applies that to git installs. torchvision still came from PyPI, so the
  pair mismatched: "operator torchvision::nms does not exist".
- A newer spatialdata raised AttributeError when opening sample slides.

Now only lazyslide, wsidata and lazyslide-models track main. Everything
else comes from uv.lock, which stays at the set from the last green
render (torch 2.12.1, torchvision 0.27.1, spatialdata 0.7.2). A torch
override drops wsidata's CPU-index source.
Copilot AI balanced review requested due to automatic review settings September 30, 2026 20:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

wsidata#76 scopes its CPU-index torch source to its dev group, so git
installs get torch from PyPI again. Re-locked wsidata to d797633; torch
2.12.1 and torchvision 0.27.1 still come from PyPI.

Also restores a space the previous commit dropped from the wsidata
source line.
The DeepSpot-M section (#3) imports lazyslide_models.tile_prediction.
DeepSpotM, which needs the deepspotm package. lazyslide-models only
lists it in its model dependency group, which dependents never get, so
declare it here the way conch is.
@Mr-Milk
Mr-Milk merged commit f030de2 into main Oct 3, 2026
0 of 2 checks passed
@Mr-Milk
Mr-Milk deleted the ci/lock-third-party-deps branch October 3, 2026 07:16
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.

2 participants