Skip to content

docs: fix the tutorial's checksum, install line and add a scale note - #6

Merged
KalinNonchev merged 1 commit into
mainfrom
docs/tutorial-fixes
Aug 3, 2026
Merged

docs: fix the tutorial's checksum, install line and add a scale note#6
KalinNonchev merged 1 commit into
mainfrom
docs/tutorial-fixes

Conversation

@KalinNonchev

Copy link
Copy Markdown
Member

Three small fixes to examples/predict_tcga_skcm.ipynb.

Checksum read the whole slide into memory. hashlib.md5(fh.read()) on a ~1 GB .svs spikes RSS by more than the model itself uses, on a machine that is about to load a foundation model onto the GPU. Now hashed in 8 MB chunks. Verified the chunked digest matches a whole-file digest.

Install line drifted from the README. The notebook asked for pip install deepspotm pyvips matplotlib; the README documents a wsi extra. Now pip install "deepspotm[wsi]" matplotlib, so there is one documented way to get the whole-slide dependencies.

No sense of scale up front. Readers had no idea what "a whole slide" costs until several cells in. Added the figures from the committed run: 99,960 x 65,991 px, a 446 x 294 tile grid, 45,751 candidate tiles from the thumbnail pass, 36,392 scored after the exact background filter. No timings, since the committed outputs do not record them.

Verification

  • nbformat.validate passes.
  • Cell outputs, execution counts (1–5) and the embedded result figure are unchanged.
  • source stays a line array in every cell, so the notebook still diffs and renders normally.

Docs only; no code, packaging or CI changes.

🤖 Generated with Claude Code

- The MD5 check read the whole ~1 GB slide into memory with `fh.read()`,
  spiking RSS by more than the model uses. Hash in 8 MB chunks instead.
- The install line asked for `deepspotm pyvips matplotlib`, which drifts from
  the `wsi` extra the README documents. Use `deepspotm[wsi]` so there is one
  documented way to install the whole-slide dependencies.
- Say up front what "a whole slide" means in practice, using the figures from
  the committed run: 99,960 x 65,991 px, a 446 x 294 grid, 45,751 candidate
  tiles, 36,392 scored after background filtering. Readers currently have no
  idea of the scale until they are several cells in.

Cell outputs, execution counts and the source line-array formatting are
unchanged, so the notebook still renders and diffs cleanly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@KalinNonchev
KalinNonchev merged commit 429fa2e into main Aug 3, 2026
7 checks passed
@KalinNonchev
KalinNonchev deleted the docs/tutorial-fixes branch August 3, 2026 14:50
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