Add nnunet one-line trainer (DAT-897) - #67
Merged
Merged
Conversation
Lucashsmello
left a comment
Collaborator
There was a problem hiding this comment.
I'll trust you on this PR. :)
Check test results with python3.10: https://github.com/SonanceAI/datamint-python-api/actions/runs/27279659681/job/80570314031?pr=67
I guess you used a feature of f-string not available on Python 3.10
luandalmazo
force-pushed
the
feat/DAT-897
branch
from
June 17, 2026 12:43
0da1ba0 to
7c7f7b0
Compare
Collaborator
Author
|
All reviewed and tested. I performed both unit and integration tests multiple times. Currently, the Git CI tests are returning errors due to the specific Python version being used and its particularities. Because of this, I have opened a new task (DAT-936) to add fallbacks and fix the tests. |
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.
Adds NNUNetTrainer, which runs the full nnUNet v2 pipeline (export -> fingerprint -> plan -> preprocess -> train -> predict -> import) in a single trainer.fit() call, logging per-epoch metrics to MLflow. Also adds the tutorial notebook.
Important to note:
The deploy bundle patches trainer_name = 'nnUNetTrainer' inside checkpoint_final.pth before logging to MLflow. This is basically a stopgap for DAT-903 (the deploy container cannot install datamint from PyPI when running a dev version). The patch is safe as long as _DatamintNNUNetTrainer does not override the network architecture. When we solve DAT-903 we should remove this patch and set nnUNet_extTrainer in load context, so users can modify the network if they want.
Closes DAT-897.