480 ODELIA call finalize_training also in swarm training - #502
Conversation
…n minimal example implemented via callback as the code in main after the while flare.is_running() loop is not executed in swarm training in our setup
…red check for expected output
…cal training test whether expected output is printed (test for swarm training will follow)
…flareis_running-loop-never-runs-launcher-sigterms-the-subprocess
…et) as part of CI
…flareis_running-loop-never-runs-launcher-sigterms-the-subprocess
…flareis_running-loop-never-runs-launcher-sigterms-the-subprocess
Merge branch '480-swarm-finalize_training-after-the-while-flareis_running-loop-never-runs-launcher-sigterms-the-subprocess' into 372-odelia-include-evaluation-on-test-data-in-localswarm-training
PR #502 ("WIP 480 ODELIA call finalize_training also in swarm training") is actively being worked and takes a different, broader approach: it removes the post-loop finalize entirely and reworks finalization in threedcnn_ptl.py, also covering minimal_training_pytorch_cnn and the CI harness. Landing a competing in-loop edit to the same shared main.py would duplicate that work and conflict. This PR keeps only the deploy-test fixes, which no open PR touches. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…flareis_running-loop-never-runs-launcher-sigterms-the-subprocess
There was a problem hiding this comment.
Approved
Two non-blocking nits
- Naming/coupling:
GT_PredProb_Output_Callbacknow also performs checkpoint finalization and carrieslogger/model/checkpointing/path_run_dir/env_varsfor that purpose. A future reader looking for "where does finalize happen" is unlikely to look in a class named for CSV export. A separate smallFinalizeCheckpointsCallbackwould keep the responsibility obvious — happy for that to be a follow-up, not a blocker. - Per-round cost:
finalize_trainingnow runs every round rather than once. It's idempotent and mostly copies already-written checkpoints, but it does ashutil.copyoflast.ckpteach round. Fine at current model sizes; worth remembering if checkpoints grow.
Context: I'd briefly opened a competing in-loop fix in #505 and reverted it once I saw this PR — #505 is now deploy-test-only, so there's no overlap.
|
Good points, let me think about this some more before merging. |
…flareis_running-loop-never-runs-launcher-sigterms-the-subprocess
(possible approach for #512)
…is called in every round, not just at the end
…ng to be executed after training has finished
… rather than just at the end)
Implemented call to finalize_training via callback so that the code is actually executed after training also in swarm training mode (which was, so far, implemented and intended to run, but was not executed in our swarm training setup).
Additionally, slightly extended test for output of 3DCNN local training (for consistency).
Builds on #491, should be reviewed and merged only afterwards.