-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add save and export to training servicer #228
Open
thodkatz
wants to merge
17
commits into
ilastik:main
Choose a base branch
from
thodkatz:add-save-export-to-training-servicer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add save and export to training servicer #228
thodkatz
wants to merge
17
commits into
ilastik:main
from
thodkatz:add-save-export-to-training-servicer
+2,717
−724
Conversation
This file contains 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
- Supported operations: start, resume, pause, shutdown - pytorch-3dunet package is used as the framework to create the models
… failed I caught an edge case, where events are blocked, because we have exited the training, and the tasks of the queue would remain unprocessed.
Creating and closing processes and threads can be quite time consuming resulting to test timeouts if the tests performs a lot of actions.
Applying monkeypatch to a parent process won't propagated to a child process if the start method is spawn (macos) instead of fork (linux)
- To fix test on windows, convert label data to float64
The should stop callbacks are boolean, so we need to aggregate their return value. Previously the return value wasn't taken into account, and the callbacks were returning none
The enum is used for validation check before triggering one of them. Previously I was checking if the queue was alive, but that won't be enough, for example if you want to perform resume, while you are resumed, the queue is operational, but the action shouldn't be valid.
thodkatz
force-pushed
the
add-save-export-to-training-servicer
branch
3 times, most recently
from
December 19, 2024 10:58
0e7735a
to
b303405
Compare
Move NamedInt and Tensor proto to a separate file so training proto can use as well
- The inference servicer had a procedure to list the available devices. This is needed or the training servicer as well. So list devices is decoupled to be shared.
If the training is running or paused, the forward, will retain the state after completion. But it requires to pause so we can release memory and do the forward pass.
thodkatz
force-pushed
the
add-save-export-to-training-servicer
branch
from
December 20, 2024 21:54
b303405
to
fc70f78
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #228 +/- ##
==========================================
- Coverage 64.60% 62.86% -1.75%
==========================================
Files 40 47 +7
Lines 2195 2838 +643
==========================================
+ Hits 1418 1784 +366
- Misses 777 1054 +277 ☔ View full report in Codecov by Sentry. |
Since both inference and training servicers have common the concept of id, the training session id was replaced with the model session one used for inference. This model session protobuf interfaced moved to a separate utils proto file. The PredictRequest being common, can be leveraged for abstraction.
thodkatz
force-pushed
the
add-save-export-to-training-servicer
branch
2 times, most recently
from
December 21, 2024 10:52
f45ebcb
to
5d7f533
Compare
- If the model was initial paused or running, save after completion retain the state, while temporarily pausing to perform the save. - The export will pause the training if not paused before.
thodkatz
force-pushed
the
add-save-export-to-training-servicer
branch
from
December 21, 2024 11:11
5d7f533
to
e4bc4d6
Compare
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.
It builds upon #227 .
Adding the options to save and export a model for the training service.
When we save, the training is paused, and then we resume. For the export, we just pause.