Skip to content

docs: tile at each model's own scale for PathProfilerQC and Prism - #4

Merged
Mr-Milk merged 3 commits into
mainfrom
fix/preprocessing-audit
Oct 5, 2026
Merged

Mr-Milk merged 3 commits into
mainfrom
fix/preprocessing-audit

Conversation

@Mr-Milk

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

Copy link
Copy Markdown
Member

Summary

Tutorial fixes from the preprocessing audit of lazyslide-models (rendeirolab/lazyslide-models#31):

  • preprocessing, visualization: PathProfiler's QC model was trained on 256 px tiles at 5x, about 2 µm/px. Upstream quality-assessment/run.py downsamples to 5X before predicting. The tutorials ran it on the 256 px tiles at 0.5 mpp. They now tile separately at mpp=2 into qc_tiles and plot those tiles.
  • zero-shot-learning: Prism reads Virchow features of 224 px tiles at 0.5 mpp, not the 512 px tiles used for CONCH. The tutorial now tiles separately into prism_tiles. CONCH keeps its 512 px tiles.

Outputs of the edited cells are cleared. The notebook workflow re-renders them.

Test plan

  • ruff check and ruff format pass (repo pre-commit hooks, ruff 0.11.12)
  • Ran the new QC cells locally on the GTEx artery slide: tile_tissues(wsi, 256, mpp=2) gives 13 tiles, and tile_prediction plus all three pl.tiles calls run
  • Prism cells: not run locally, because the Virchow and Prism weights are gated. The notebook workflow on this PR runs them.

- preprocessing, visualization: PathProfiler's QC model was trained on
  256 px tiles at 5x (about 2 µm/px; upstream quality-assessment/run.py
  downsamples to 5X), not 0.5 mpp. Tile for it separately at mpp=2 and
  plot those tiles.
- zero-shot-learning: Prism reads Virchow features of 224 px tiles at
  0.5 mpp, not the 512 px tiles used for CONCH. Tile for it separately.

Edited cells have their outputs cleared; the notebook workflow
re-renders them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 29, 2026 16:29
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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 review overview

🟢 Approval recommended

The Prism workflow consistently uses the dedicated tile key and correctly derived feature key.

Review effort: Balanced
Findings: None

What changed in this PR

Corrects tutorial preprocessing so PathProfilerQC and Prism use their model-specific tile scales.

Changes:

  • Adds dedicated 224 px, 0.5 mpp Prism tiling.
  • Uses Prism-specific Virchow feature keys.
  • Clears affected notebook outputs.
File Description
tutorials/​zero-shot-learning.ipynb Uses correctly scaled Prism tiles and features.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Mr-Milk and others added 2 commits October 5, 2026 18:10
# Conflicts:
#	tutorials/preprocessing.ipynb
#	tutorials/visualization.ipynb
#	tutorials/zero-shot-learning.ipynb
@Mr-Milk
Mr-Milk merged commit a77663f into main Oct 5, 2026
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