-
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 is best model to training servicer #229
Open
thodkatz
wants to merge
19
commits into
ilastik:main
Choose a base branch
from
thodkatz:add-is-best-model-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 is best model to training servicer #229
thodkatz
wants to merge
19
commits into
ilastik:main
from
thodkatz:add-is-best-model-to-training-servicer
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-is-best-model-to-training-servicer
branch
3 times, most recently
from
December 19, 2024 11:15
b60fb5f
to
90b4a5e
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-is-best-model-to-training-servicer
branch
from
December 20, 2024 22:04
90b4a5e
to
811ddd3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #229 +/- ##
==========================================
- Coverage 64.60% 62.83% -1.78%
==========================================
Files 40 47 +7
Lines 2195 2876 +681
==========================================
+ Hits 1418 1807 +389
- Misses 777 1069 +292 ☔ 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-is-best-model-to-training-servicer
branch
from
December 21, 2024 10:52
811ddd3
to
b10d4f9
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.
Whenever we have a new model, a stream will yield a response. The client can utilize this to perform certain actions e.g. ilastik to propagateDirty any predictions performed on previous models.
The response of the best model stream will return an id. The id is increased by one, each time we have a new model. A client can identify if an action has been performed by an outdated model based on the id. If the current is greater, then a new best model exists.
thodkatz
force-pushed
the
add-is-best-model-to-training-servicer
branch
from
December 21, 2024 11:15
b10d4f9
to
14f81af
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 #228 .
Whenever we have a new best model, the
IsBestModel
stream will yield a response. The client can utilize this to perform certain actions e.g. ilastik topropagateDirty
any predictions performed on previous models.