[WIP] Add checkpoint/resume functionality to EMD solver#780
Open
nathanneike wants to merge 3 commits intoPythonOT:masterfrom
Open
[WIP] Add checkpoint/resume functionality to EMD solver#780nathanneike wants to merge 3 commits intoPythonOT:masterfrom
nathanneike wants to merge 3 commits intoPythonOT:masterfrom
Conversation
Implements pause and resume capabilities for the EMD (Earth Mover's Distance) solver, allowing long-running optimizations to be interrupted and continued from their exact state. Changes: - Modified EMD_wrap() signature to accept checkpoint parameters for saving and restoring complete internal solver state (flow, potentials, tree structure) - Added saveCheckpoint(), restoreCheckpoint(), and runFromCheckpoint() methods to NetworkSimplexSimple class in network_simplex_simple.h - Extended emd_c() Cython wrapper to handle checkpoint dictionaries with 12 fields (10 arrays + 2 scalar arc counts) - Added 'checkpoint' and 'return_checkpoint' parameters to emd() Python API - Includes search_arc_num and all_arc_num scalars in checkpoint to preserve initialization state required by start() method Tests: - Added test_emd_checkpoint() for basic save/resume functionality - Added test_emd_checkpoint_multiple() for multiple pause/resume cycles - Added test_emd_checkpoint_structure() to verify checkpoint field integrity
…eclaration to only have one now
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.
Implements pause and resume capabilities for the EMD (Earth Mover's Distance) solver, allowing long-running optimizations to be interrupted and continued from their exact state.
Changes:
Tests:
Types of changes
Motivation and context / Related issue
How has this been tested (if it applies)
PR checklist