GEOPY-2544: Add mechanics to re-start inversion if results are present in the SimPEGGroups#161
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to enable “resume/re-start” inversion workflows by making optimization / directive logic less dependent on iter == 0 and by preventing first-iteration outputs from being rewritten when prior results already exist (e.g., in SimPEGGroups / GeoH5 outputs).
Changes:
- Adjust optimization initialization and stopping-criteria baselining to better support resumed runs (and tweak iteration print formatting precision).
- Update GeoH5 saving directives to avoid writing iteration-0 outputs on non-zero
opt.iter, and refine how data entity types are handled when writing. - Improve directive behavior for scaling misfit multipliers and ensure Dask inverse problems recompute residuals when missing.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| simpeg/optimization.py | Changes iteration printing precision and alters optimizer iteration / baseline initialization to support restart/resume flows. |
| simpeg/directives/_sim_directives.py | Refactors cross-gradient scaling to accept an explicit model argument and calls it from endIter. |
| simpeg/directives/_save_geoh5.py | Skips writing iteration 0 on resumed runs and adjusts entity type handling when writing GeoH5 data/logs. |
| simpeg/directives/_directives.py | Updates ScaleMisfitMultipliers to support restarts and adds a cooling factor concept plus higher-precision logging. |
| simpeg/dask/inverse_problem.py | Ensures residuals are recomputed when absent even if the model hasn’t changed. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
benk-mira
requested changes
Jul 2, 2026
benk-mira
approved these changes
Jul 7, 2026
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.
GEOPY-2544 - Add mechanics to re-start inversion if results are present in the SimPEGGroups