Skip to content

Experiment/radboud eval - #35

Merged
ejdam87 merged 310 commits into
masterfrom
experiment/radboud-eval
Aug 4, 2026
Merged

Experiment/radboud eval#35
ejdam87 merged 310 commits into
masterfrom
experiment/radboud-eval

Conversation

@ejdam87

@ejdam87 ejdam87 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

This PR adds evaluation on Radboud

Summary by CodeRabbit

  • New Features

    • Added Radboud dataset workflows for preprocessing, embedding generation, prediction, and model evaluation.
    • Added support for filtered tiles at 224px and 512px resolutions.
    • Added configurable image transforms and stain-normalization support.
    • Added public checkpoints for supported Google ViT, PGP, ResNet50, VGG16, and Virchow2 models.
  • Bug Fixes

    • Corrected dataset and checkpoint references, including resolution-specific artifacts.
    • Improved slide output handling and tile file partitioning.
    • Expanded validation filtering to include residual, blur, and folding metrics.

@ejdam87
ejdam87 requested review from a team, Adames4 and vejtek August 4, 2026 12:07
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ejdam87, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 55b50bdf-e35d-49ec-b27a-213d9e0b9903

📥 Commits

Reviewing files that changed from the base of the PR and between 6ee9d72 and 2dada5f.

📒 Files selected for processing (1)
  • preprocessing/embeddings/tile_embeddings_v2.py
📝 Walkthrough

Walkthrough

Radboud tile artifact URIs and QC annotations were updated. New preprocessing, prediction, and test-suite configurations were added. Public checkpoint references were added or corrected. Dataset transform configuration, stain normalization, tile embedding output handling, typing, imports, and Git dependencies were changed.

Changes

Radboud data and preprocessing

Layer / File(s) Summary
Data and transform contracts
configs/data/radboud/*, configs/datamodule/datasets/images/*, prostate_cancer/datamodule/transforms/stain_normalization.py, prostate_cancer/typing.py, prostate_cancer/vit_model.py, pyproject.toml
Radboud tile URIs and QC comments were updated. Dataset transform fields and a stain-normalization factory were added. Type comments, imports, and Git dependency revisions were updated.
Preprocessing workflows
configs/experiment/preprocessing/*, preprocessing/embeddings/tile_embeddings_v2.py
Radboud filtering, tile-mask, and tile-embedding configurations were added or updated. Tile embedding outputs now use a recreated slides directory and max_rows_per_file.

Model evaluation configurations

Layer / File(s) Summary
Public model checkpoints
configs/model/checkpoints/mmci_tl/*
Public checkpoint artifact references were added for Google ViT, PGP, and Virchow2 models. ResNet50 and VGG16 references now use size-specific artifacts.
Prediction evaluation configurations
configs/experiment/predict/embeddings/*, configs/experiment/predict/images/*
Radboud prediction configurations were added for PGP, Virchow2, Google ViT, ResNet50, and VGG16 evaluation variants.
Test-suite configurations
configs/experiment/test/*
Radboud test-suite configurations were added for embedding, bag-of-embeddings, Google ViT, ResNet50, and VGG16 variants. The base test configuration now includes stains.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: vejtek, adames4

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding Radboud evaluation experiments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch experiment/radboud-eval

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
configs/data/radboud/val_heuristic_normalized.yaml (1)

1-1: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Disable or remove Radboud QC-invalid test configs that still reference the annotated data files. The URIs in configs/data/radboud/val_heuristic_normalized.yaml and configs/data/radboud/val_ml_normalized.yaml are still resolvable, while active /experiment/test/*.yaml configs continue to load them as target data.

  • configs/experiment/test/images/resnet50/test_suite/radboud_val_heuristic_normalized.yaml, configs/experiment/test/images/vgg16/test_suite/radboud_val_heuristic_normalized.yaml, and similar val_ml_normalized test configs.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@configs/data/radboud/val_heuristic_normalized.yaml` at line 1, Disable or
remove the Radboud QC-invalid data configurations
`val_heuristic_normalized.yaml` and `val_ml_normalized.yaml`, along with the
active `/experiment/test` ResNet50, VGG16, and corresponding test-suite configs
that reference them as target data, so these annotated-data URIs are no longer
loaded by test experiments.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@configs/data/radboud/val_heuristic_normalized.yaml`:
- Around line 5-6: Remove the tiles_uri_512 and tiles_uri_224 entries from this
Radboud test configuration section, or replace their mlflow-artifacts URIs with
a placeholder URI that will fail fast with a clear error message. The trailing
"invalid QC" comments do not prevent these configurations from being loaded and
used by active experiments, so a functional change to the URIs themselves is
required instead of relying on comments to disable them.

In `@preprocessing/embeddings/tile_embeddings_v2.py`:
- Around line 89-94: Preserve the existing root-level artifact layout in the
output flow around slides_parquet_dir and the slides.to_parquet call: continue
writing slides.parquet where current Radboud consumers expect it, unless all
listed consumers are updated together. If introducing the nested slides
directory, add migration cleanup that removes the old root artifact and prevents
stale metadata when reusing output_path.

In `@prostate_cancer/typing.py`:
- Around line 44-46: Update the inline comment on UnlabeledTileSampleBatch to
describe its actual two-element shape, Tensor followed by TileMetadataBatch, and
remove the incorrect labels element.

---

Outside diff comments:
In `@configs/data/radboud/val_heuristic_normalized.yaml`:
- Line 1: Disable or remove the Radboud QC-invalid data configurations
`val_heuristic_normalized.yaml` and `val_ml_normalized.yaml`, along with the
active `/experiment/test` ResNet50, VGG16, and corresponding test-suite configs
that reference them as target data, so these annotated-data URIs are no longer
loaded by test experiments.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 11225f79-874c-4277-88cb-a75b78db6861

📥 Commits

Reviewing files that changed from the base of the PR and between 8c9bcf0 and 6ee9d72.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (74)
  • configs/data/radboud/test.yaml
  • configs/data/radboud/train.yaml
  • configs/data/radboud/val.yaml
  • configs/data/radboud/val_heuristic_normalized.yaml
  • configs/data/radboud/val_ml_normalized.yaml
  • configs/datamodule/datasets/images/labeled.yaml
  • configs/datamodule/datasets/images/unlabeled.yaml
  • configs/datamodule/transforms/augmentations.yaml
  • configs/experiment/predict/embeddings/pgp/multi_aggregator_eval/radboud_test.yaml
  • configs/experiment/predict/embeddings/pgp/multi_aggregator_eval/stain_radboud_test.yaml
  • configs/experiment/predict/embeddings/virchow2/multi_aggregator_eval/radboud_test.yaml
  • configs/experiment/predict/embeddings/virchow2/multi_aggregator_eval/stain_radboud_test.yaml
  • configs/experiment/predict/images/google_vit/multi_aggregator_eval/radboud_test.yaml
  • configs/experiment/predict/images/google_vit/multi_aggregator_eval/stain_radboud_test.yaml
  • configs/experiment/predict/images/resnet50/heatmaps_and_max_aggregations/radboud_test.yaml
  • configs/experiment/predict/images/resnet50/multi_aggregator_eval/radboud_test.yaml
  • configs/experiment/predict/images/resnet50/multi_aggregator_eval/radboud_test_224.yaml
  • configs/experiment/predict/images/resnet50/multi_aggregator_eval/stain_radboud_test.yaml
  • configs/experiment/predict/images/resnet50/multi_aggregator_eval/stain_radboud_test_224.yaml
  • configs/experiment/predict/images/vgg16/multi_aggregator_eval/radboud_test.yaml
  • configs/experiment/predict/images/vgg16/multi_aggregator_eval/radboud_test_224.yaml
  • configs/experiment/predict/images/vgg16/multi_aggregator_eval/stain_radboud_test.yaml
  • configs/experiment/predict/images/vgg16/multi_aggregator_eval/stain_radboud_test_224.yaml
  • configs/experiment/preprocessing/filter_tiles/radboud_test.yaml
  • configs/experiment/preprocessing/filter_tiles/radboud_train.yaml
  • configs/experiment/preprocessing/filter_tiles/radboud_val.yaml
  • configs/experiment/preprocessing/tile_embeddings_v2/pgp/base.yaml
  • configs/experiment/preprocessing/tile_embeddings_v2/pgp/radboud_test.yaml
  • configs/experiment/preprocessing/tile_embeddings_v2/pgp/radboud_val.yaml
  • configs/experiment/preprocessing/tile_embeddings_v2/virchow2/radboud_test.yaml
  • configs/experiment/preprocessing/tile_embeddings_v2/virchow2/radboud_val.yaml
  • configs/experiment/preprocessing/tile_masks/radboud_test_224.yaml
  • configs/experiment/preprocessing/tile_masks/radboud_test_512.yaml
  • configs/experiment/preprocessing/tile_masks/radboud_train_224.yaml
  • configs/experiment/preprocessing/tile_masks/radboud_train_512.yaml
  • configs/experiment/preprocessing/tile_masks/radboud_val_224.yaml
  • configs/experiment/preprocessing/tile_masks/radboud_val_512.yaml
  • configs/experiment/test/bag_of_embeddings/pgp/test_suite/classic_radboud_test.yaml
  • configs/experiment/test/bag_of_embeddings/pgp/test_suite/hybrid_radboud_test.yaml
  • configs/experiment/test/bag_of_embeddings/virchow2/test_suite/classic_radboud_test.yaml
  • configs/experiment/test/bag_of_embeddings/virchow2/test_suite/hybrid_radboud_test.yaml
  • configs/experiment/test/base.yaml
  • configs/experiment/test/embeddings/pgp/test_suite/radboud_test.yaml
  • configs/experiment/test/embeddings/pgp/test_suite/stain_radboud_test.yaml
  • configs/experiment/test/embeddings/virchow2/test_suite/radboud_test.yaml
  • configs/experiment/test/embeddings/virchow2/test_suite/stain_radboud_test.yaml
  • configs/experiment/test/images/google_vit/test_suite/radboud_test.yaml
  • configs/experiment/test/images/google_vit/test_suite/stain_radboud_test.yaml
  • configs/experiment/test/images/resnet50/test_suite/radboud_test.yaml
  • configs/experiment/test/images/resnet50/test_suite/radboud_test_224.yaml
  • configs/experiment/test/images/resnet50/test_suite/stain_radboud_test.yaml
  • configs/experiment/test/images/resnet50/test_suite/stain_radboud_test_224.yaml
  • configs/experiment/test/images/vgg16/test_suite/radboud_test.yaml
  • configs/experiment/test/images/vgg16/test_suite/radboud_test_224.yaml
  • configs/experiment/test/images/vgg16/test_suite/stain_radboud_test.yaml
  • configs/experiment/test/images/vgg16/test_suite/stain_radboud_test_224.yaml
  • configs/model/checkpoints/mmci_tl/google_vit.yaml
  • configs/model/checkpoints/mmci_tl/google_vit_stain.yaml
  • configs/model/checkpoints/mmci_tl/pgp_classic_mil.yaml
  • configs/model/checkpoints/mmci_tl/pgp_hybrid_mil.yaml
  • configs/model/checkpoints/mmci_tl/pgp_stain.yaml
  • configs/model/checkpoints/mmci_tl/resnet50_224.yaml
  • configs/model/checkpoints/mmci_tl/resnet50_stain_224.yaml
  • configs/model/checkpoints/mmci_tl/vgg16_224.yaml
  • configs/model/checkpoints/mmci_tl/vgg16_stain_224.yaml
  • configs/model/checkpoints/mmci_tl/virchow2_classic_mil.yaml
  • configs/model/checkpoints/mmci_tl/virchow2_hybrid_mil.yaml
  • configs/model/checkpoints/mmci_tl/virchow2_stain.yaml
  • preprocessing/embeddings/tile_embeddings_v2.py
  • prostate_cancer/datamodule/transforms/__init__.py
  • prostate_cancer/datamodule/transforms/stain_normalization.py
  • prostate_cancer/typing.py
  • prostate_cancer/vit_model.py
  • pyproject.toml
💤 Files with no reviewable changes (1)
  • configs/datamodule/transforms/augmentations.yaml

Comment thread configs/data/radboud/val_heuristic_normalized.yaml
Comment thread preprocessing/embeddings/tile_embeddings_v2.py Outdated
Comment thread prostate_cancer/typing.py Outdated
@coderabbitai coderabbitai Bot mentioned this pull request Aug 4, 2026
@ejdam87
ejdam87 merged commit fa30850 into master Aug 4, 2026
3 checks passed
@ejdam87
ejdam87 deleted the experiment/radboud-eval branch August 4, 2026 19:31
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.

3 participants