Repository navigation
ci: lock third-party deps when rendering notebooks - #5
Merged
Merged
Conversation
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The notebook render has been red on
mainsince July (last green: June 19). Two causes:build_notebooks.yamlranuv sync --dev --upgrade. Every render re-resolved all ~300 packages and then auto-committed the newuv.lock.deepspotm, which this repo never declared.In the last run before this PR (#4, log), 11 of 12 notebooks failed:
RuntimeError: operator torchvision::nms does not existmainpointed Linuxtorchat the PyTorch CPU index (wsidata#69), and uv applies that to git installs. So this repo gottorch==2.14.0+cpunext to PyPI'storchvision==0.29.0. Fixed upstream in wsidata#76.AttributeError: 'NoneType' object has no attribute 'lower'inspatialdata/_core/validation.pyKeyError: 'wsi:Pathology Categories'Changes
build_notebooks.yaml:uv sync --dev --upgrade-package lazyslide --upgrade-package wsidata --upgrade-package lazyslide-models. The three in-house packages still trackmain. Everything else comes fromuv.lock, at the set from the last green render (torch 2.12.1, torchvision 0.27.1, spatialdata 0.7.2).pyproject.toml: adddeepspotmfrom git, the same wayconchis declared. The lock only gainsdeepspotmandpeft.uv.lock: re-locked with only the in-house packages upgraded (wsidata is now atd797633, 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
torch==2.12.1andtorchvision==0.27.1(no+cpu),spatialdata==0.7.2. 11 of 12 notebooks passed. The only failure wasgene_expression_prediction:ModuleNotFoundError: No module named 'deepspotm', which thedeepspotmcommit fixes.uv lock --lockedpasses, the lock has nodownload.pytorch.orgentries, andfrom lazyslide_models.tile_prediction import DeepSpotMimports.After this lands
mainmerged in, so its render picks up the lock.