Repository navigation
Conversation
Moved from mlkit, as agreed for DEV-161: extensions of third-party
frameworks for digital pathology belong in ratiopath (like train_test_split
for scikit-learn). The callback adds on_{stage}_dataloader_start/end hooks
for validation, test and predict. Lightning is an optional extra
(ratiopath[lightning]); the logic is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
Contributor
Documentation PreviewPreview URL: https://RationAI.github.io/ratiopath/claude-multiloader-lifecycle/ |
matejpekar
approved these changes
Oct 15, 2026
Adames4
approved these changes
Oct 15, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves
MultiloaderLifecyclefrom mlkit into ratiopath, as agreed at the 8 Oct repository meeting (DEV-161): extensions of third-party frameworks for digital pathology belong in ratiopath, the waytrain_test_splitextends scikit-learn. Here it is PyTorch Lightning.Changes
ratiopath/lightning/callbacks/multiloader_lifecycle.py: the callback addson_{stage}_dataloader_start/_endhooks forvalidation,testandpredict. The logic is copied fromrationai.mlkit.lightning.callbacksunchanged (diffed). The empty hook stubs got docstrings, and the class got a Google-style docstring with an example.pip install ratiopath[lightning](lightning>=2.4.0). The base install doesn't change. Lightning is also in thetestsgroup, so the new tests run in CI.tests/test_multiloader_lifecycle.py: hook order across dataloader changes for all three stages, state reset between epochs, and an epoch with no batches.Checks (local)
pytest: 381 passed (5 new).mypy .: clean.ruff check/ruff format --check(0.17.0): clean.mkdocs build --strict: passes.uv.lockonly adds lightning and its dependencies (torchmetrics, pytorch-lightning, aiohttp, …), nothing upgraded.Follow-up and questions
carcinoma-binary-classification-methodsandstain-normalizationuse it), and then drops the copy.ratiopath.lightning.callbacksthe namespace you want, or would you rather have something underratiopath.torch?🤖 Generated with Claude Code