Skip to content

📝 Update Example Notebook 11-import-foundation-models.ipynb#994

Merged
shaneahmed merged 2 commits intodev-define-engines-abcfrom
dev-update-example-notebook11
Feb 13, 2026
Merged

📝 Update Example Notebook 11-import-foundation-models.ipynb#994
shaneahmed merged 2 commits intodev-define-engines-abcfrom
dev-update-example-notebook11

Conversation

@YijieZhu15
Copy link
Collaborator

@YijieZhu15 YijieZhu15 commented Feb 10, 2026

📘 Summary

This PR updates the 11-import-foundation-models.ipynb example to align with the latest TIAToolbox APIs and modern best practices. The notebook now uses Hugging Face Hub for dataset retrieval, Zarr for feature storage, the updated DeepFeatureExtractor pipeline, and improved IO configuration. Several cells and metadata entries were cleaned up for a more consistent, reproducible, and user-friendly demo.


🔧 What’s Changed

Data Access

  • Replaced deprecated download_data() usage with hf_hub_download() for fetching sample WSIs.
  • Automatically creates a local ./tmp directory if missing.

Imports & Dependencies

  • Added dask.array and zarr to support lazy, chunked feature loading.
  • Updated TIAToolbox imports:
    • DeepFeatureExtractor from engine.deep_feature_extractor
    • IOPatchPredictorConfig from engine.io_config

Model & Pipeline Updates

  • Removed explicit TimmBackbone usage; now uses model="UNI" directly in DeepFeatureExtractor.
  • Replaced IOSegmentorConfig with the updated IOPatchPredictorConfig.
  • Inference call migrated from predict() to run() using the new API.

Output Format Changes

  • Switched from storing features as .npy files to a consolidated Zarr store.
  • Updated later steps to read features and coordinates using zarr.open() + dask.array.from_zarr().

Notebook Cleanup

  • Changed several cell tags from remove-cell to hide-output for cleaner diffs and readability.
  • Cleared execution counts and removed unnecessary output noise.
  • Added a cleanup cell to delete temporary directories.
  • Updated kernel metadata to Python 3.10 and renamed environment to tiatoolbox-dev.

Documentation Edits

  • Corrected model-selection guidance for UNI, Prov‑GigaPath, and H‑optimus‑0.
  • Updated text to reference the newer model argument and correct IO config naming.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.33%. Comparing base (d6ef926) to head (6d1da44).
⚠️ Report is 1 commits behind head on dev-define-engines-abc.

Additional details and impacted files
@@                   Coverage Diff                   @@
##           dev-define-engines-abc     #994   +/-   ##
=======================================================
  Coverage                   95.33%   95.33%           
=======================================================
  Files                          79       79           
  Lines                       10001    10001           
  Branches                     1290     1290           
=======================================================
  Hits                         9534     9534           
  Misses                        431      431           
  Partials                       36       36           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shaneahmed shaneahmed changed the title Update example notebook11 📝 Update Example Notebook 11 Feb 11, 2026
@shaneahmed shaneahmed added the documentation Improvements or additions to documentation label Feb 11, 2026
@shaneahmed shaneahmed added this to the Release v2.0.0 milestone Feb 11, 2026
@shaneahmed shaneahmed changed the title 📝 Update Example Notebook 11 📝 Update Example Notebook 11-import-foundation-models.ipynb Feb 12, 2026
Copy link
Member

@shaneahmed shaneahmed left a comment

Choose a reason for hiding this comment

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

Thanks @YijieZhu15

Looks good. I have reverted the output to previous image.

@shaneahmed shaneahmed merged commit 1e340d3 into dev-define-engines-abc Feb 13, 2026
15 checks passed
@shaneahmed shaneahmed deleted the dev-update-example-notebook11 branch February 13, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants