Feature/multi aggregation eval - #31
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Warning Review limit reached
Next review available in: 30 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughAdds ChangesMulti-aggregator callback and experiment configurations
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Lightning
participant MultiAggregatorEvalCallback
participant Aggregators
participant MLflow
Lightning->>MultiAggregatorEvalCallback: deliver prediction batches
MultiAggregatorEvalCallback->>Aggregators: update tile outputs
Aggregators-->>MultiAggregatorEvalCallback: return slide predictions
MultiAggregatorEvalCallback->>MLflow: log result tables and metrics
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 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/experiment/predict/images/resnet50/multi_aggregator_eval/stain_base.yaml`:
- Around line 15-19: Update top_k_aggregator in
configs/experiment/predict/images/resnet50/multi_aggregator_eval/stain_base.yaml,
configs/experiment/predict/images/google_vit/estimations/stain_top_k_estimation.yaml,
and
configs/experiment/predict/images/google_vit/estimations/top_k_estimation.yaml
so no configuration combines kernel_size: 1 with k greater than 1; ensure k is
less than or equal to kernel_size in every affected multi-aggregator estimator
configuration.
In `@prostate_cancer/callbacks/multi_aggregator_eval_callback.py`:
- Around line 28-31: Update the module or class docstring around the aggregation
description to insert a blank line after the one-line summary and before the
longer description, satisfying Ruff D205 without changing the documented
behavior.
- Around line 113-115: Update the target handling in the callback’s prediction
aggregation flow around slide_name and target: require a non-missing carcinoma
target before appending results to stored tables, and raise a clear error when
it is absent. Ensure _compute_metrics only receives valid labeled targets,
preserving the existing metric computation path.
- Around line 78-87: Update the validation before the `cast` in the callback
setup to reject both a missing `trainer.datamodule` attribute and a `None`
datamodule value, raising the existing intended `ValueError` before accessing
`datamodule.predict`; preserve the existing `TileDataModule` cast and slide
selection flow for valid values.
- Around line 139-162: Update on_predict_epoch_end to gather and merge tables
and majority_table from all distributed ranks before computing metrics or
writing artifacts. Restrict JSON generation, MLflow artifact logging, and
mlflow.log_metrics to global-zero, using the merged data so each slide and
majority-vote result is logged once.
🪄 Autofix (Beta)
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: e5d3cfb2-108b-4a56-ad85-b5620609a5e6
📒 Files selected for processing (37)
configs/callbacks/multi_aggregator_eval.yamlconfigs/experiment/predict/embeddings/pgp/multi_aggregator_eval/base.yamlconfigs/experiment/predict/embeddings/pgp/multi_aggregator_eval/mmci_tl_test.yamlconfigs/experiment/predict/embeddings/pgp/multi_aggregator_eval/stain_base.yamlconfigs/experiment/predict/embeddings/pgp/multi_aggregator_eval/stain_mmci_tl_test.yamlconfigs/experiment/predict/embeddings/virchow2/multi_aggregator_eval/base.yamlconfigs/experiment/predict/embeddings/virchow2/multi_aggregator_eval/mmci_tl_test.yamlconfigs/experiment/predict/embeddings/virchow2/multi_aggregator_eval/stain_base.yamlconfigs/experiment/predict/embeddings/virchow2/multi_aggregator_eval/stain_mmci_tl_test.yamlconfigs/experiment/predict/images/google_vit/estimations/mpm_estimation.yamlconfigs/experiment/predict/images/google_vit/estimations/span_estimation.yamlconfigs/experiment/predict/images/google_vit/estimations/stain_mpm_estimation.yamlconfigs/experiment/predict/images/google_vit/estimations/stain_span_estimation.yamlconfigs/experiment/predict/images/google_vit/estimations/stain_top_k_estimation.yamlconfigs/experiment/predict/images/google_vit/estimations/top_k_estimation.yamlconfigs/experiment/predict/images/google_vit/multi_aggregator_eval/base.yamlconfigs/experiment/predict/images/google_vit/multi_aggregator_eval/mmci_tl_test.yamlconfigs/experiment/predict/images/google_vit/multi_aggregator_eval/stain_base.yamlconfigs/experiment/predict/images/google_vit/multi_aggregator_eval/stain_mmci_tl_test.yamlconfigs/experiment/predict/images/resnet50/multi_aggregator_eval/base.yamlconfigs/experiment/predict/images/resnet50/multi_aggregator_eval/base_224.yamlconfigs/experiment/predict/images/resnet50/multi_aggregator_eval/mmci_tl_test.yamlconfigs/experiment/predict/images/resnet50/multi_aggregator_eval/mmci_tl_test_224.yamlconfigs/experiment/predict/images/resnet50/multi_aggregator_eval/stain_base.yamlconfigs/experiment/predict/images/resnet50/multi_aggregator_eval/stain_base_224.yamlconfigs/experiment/predict/images/resnet50/multi_aggregator_eval/stain_mmci_tl_test.yamlconfigs/experiment/predict/images/resnet50/multi_aggregator_eval/stain_mmci_tl_test_224.yamlconfigs/experiment/predict/images/vgg16/multi_aggregator_eval/base.yamlconfigs/experiment/predict/images/vgg16/multi_aggregator_eval/base_224.yamlconfigs/experiment/predict/images/vgg16/multi_aggregator_eval/mmci_tl_test.yamlconfigs/experiment/predict/images/vgg16/multi_aggregator_eval/mmci_tl_test_224.yamlconfigs/experiment/predict/images/vgg16/multi_aggregator_eval/stain_base.yamlconfigs/experiment/predict/images/vgg16/multi_aggregator_eval/stain_base_224.yamlconfigs/experiment/predict/images/vgg16/multi_aggregator_eval/stain_mmci_tl_test.yamlconfigs/experiment/predict/images/vgg16/multi_aggregator_eval/stain_mmci_tl_test_224.yamlprostate_cancer/callbacks/__init__.pyprostate_cancer/callbacks/multi_aggregator_eval_callback.py
This PR adds aggregator evaluation and related
Summary by CodeRabbit