GEOPY-2544: Add mechanics to re-start inversion if results are present in the SimPEGGroups by domfournier · Pull Request #441 · MiraGeoscience/simpeg-drivers · GitHub
Skip to content

GEOPY-2544: Add mechanics to re-start inversion if results are present in the SimPEGGroups#441

Open
domfournier wants to merge 17 commits into
developfrom
GEOPY-2544
Open

GEOPY-2544: Add mechanics to re-start inversion if results are present in the SimPEGGroups#441
domfournier wants to merge 17 commits into
developfrom
GEOPY-2544

Conversation

@domfournier

@domfournier domfournier commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

GEOPY-2544 - Add mechanics to re-start inversion if results are present in the SimPEGGroups

@domfournier domfournier marked this pull request as ready for review June 30, 2026 20:02
Copilot AI review requested due to automatic review settings June 30, 2026 20:02
@github-actions github-actions Bot changed the title GEOPY-2544 GEOPY-2544: Add mechanics to re-start inversion if results are present in the SimPEGGroups Jun 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds warm-start / restart mechanics so inversions can resume from previously saved results stored under SimPEGGroup outputs, with corresponding updates to joint drivers, vector inversions, Dask entrypoints, and regression tests.

Changes:

  • Implement warm-start path in the core driver (start_iteration support), including model/directive reset hooks.
  • Add driver-specific _reset_models / _reset_directives behavior for vector and joint inversions.
  • Extend run-tests to cover restart behavior and update environment/dependency pins to the GEOPY-2544 stack.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/run_tests/driver_mvi_test.py Adds restart test coverage for magnetic vector inversion and updates test setup to persist/reuse output groups.
tests/run_tests/driver_joint_surveys_test.py Updates joint surveys inversion test flow to run via UI JSON and adds restart test.
tests/run_tests/driver_joint_cross_gradient_test.py Updates cross-gradient joint inversion tests and adds restart test + warm-start support validation.
tests/run_tests/driver_grav_test.py Updates gravity inversion tests for new run mechanics and adds restart test.
simpeg_drivers/utils/utils.py Extends Dask runner to pass start_iteration and adds a CLI argument parser helper.
simpeg_drivers/potential_fields/magnetic_vector/inversion.py Adds iteration-based model reset for magnetic vector inversion warm-start.
simpeg_drivers/potential_fields/magnetic_vector_pde/inversion.py Adds iteration-based model reset for magnetic vector PDE inversion warm-start.
simpeg_drivers/potential_fields/gravity/inversion.py Switches CLI entrypoint to use shared argument parsing and passes args into Dask run.
simpeg_drivers/joint/joint_surveys/driver.py Removes eager initialization and adds warm-start model reset behavior for joint surveys.
simpeg_drivers/joint/joint_petrophysics/driver.py Removes eager initialization to align with deferred initialization model.
simpeg_drivers/joint/joint_cross_gradient/driver.py Removes eager initialization; adjusts directives reset to handle warm-start and avoid redundant regularization builds.
simpeg_drivers/joint/driver.py Adds guarded initialization, explicit simpeg_run(), and warm-start iteration reset plumbing for joint drivers.
simpeg_drivers/driver.py Implements warm-start flow, start_iteration plumbing, directive/model reset helpers, and adds first_child_of_type.
simpeg_drivers/components/models.py Avoids re-adding active_cells data if it already exists (restart compatibility).
simpeg_drivers/components/factories/directives_factory.py Adjusts directive ordering, propagates cooling factor into misfit scaling, and factors out angle datatype creation.
pyproject.toml Pins mira-simpeg dependency to the GEOPY-2544 revision.
py-3.13.conda-lock.yml Updates lockfile content hashes and dependency versions for the new dependency set.
environments/py-3.13-win-64.conda.lock.yml Updates Windows Py3.13 lock to match revised dependency set.
environments/py-3.13-win-64-dev.conda.lock.yml Updates Windows Py3.13 dev lock to match revised dependency set.
environments/py-3.13-linux-64.conda.lock.yml Updates Linux Py3.13 lock to match revised dependency set.
environments/py-3.13-linux-64-dev.conda.lock.yml Updates Linux Py3.13 dev lock to match revised dependency set.
environments/py-3.12-win-64.conda.lock.yml Updates Windows Py3.12 lock to match revised dependency set.
environments/py-3.12-win-64-dev.conda.lock.yml Updates Windows Py3.12 dev lock to match revised dependency set.
environments/py-3.12-linux-64.conda.lock.yml Updates Linux Py3.12 lock to match revised dependency set.
environments/py-3.12-linux-64-dev.conda.lock.yml Updates Linux Py3.12 dev lock to match revised dependency set.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread simpeg_drivers/driver.py
Comment thread simpeg_drivers/driver.py
Comment thread simpeg_drivers/driver.py Outdated
Comment thread simpeg_drivers/driver.py Outdated
Comment thread simpeg_drivers/utils/utils.py Outdated
Comment thread tests/run_tests/driver_joint_surveys_test.py
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.22305% with 107 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.25%. Comparing base (849e00d) to head (dde24a2).
⚠️ Report is 17 commits behind head on develop.

Files with missing lines Patch % Lines
.../potential_fields/magnetic_vector_pde/inversion.py 22.72% 17 Missing ⚠️
simpeg_drivers/driver.py 83.07% 5 Missing and 6 partials ⚠️
simpeg_drivers/utils/utils.py 15.38% 11 Missing ⚠️
...vers/potential_fields/magnetic_vector/inversion.py 77.27% 4 Missing and 1 partial ⚠️
simpeg_drivers/joint/joint_surveys/driver.py 76.92% 2 Missing and 1 partial ⚠️
...tricals/direct_current/three_dimensions/forward.py 33.33% 2 Missing ⚠️
...icals/direct_current/three_dimensions/inversion.py 33.33% 2 Missing ⚠️
...ectricals/direct_current/two_dimensions/forward.py 33.33% 2 Missing ⚠️
...tricals/direct_current/two_dimensions/inversion.py 33.33% 2 Missing ⚠️
...s/induced_polarization/three_dimensions/forward.py 33.33% 2 Missing ⚠️
... and 25 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #441      +/-   ##
===========================================
- Coverage    90.60%   90.25%   -0.35%     
===========================================
  Files          113      113              
  Lines         6907     7010     +103     
  Branches       831      862      +31     
===========================================
+ Hits          6258     6327      +69     
- Misses         438      466      +28     
- Partials       211      217       +6     
Files with missing lines Coverage Δ
...drivers/components/factories/directives_factory.py 95.71% <100.00%> (+0.10%) ⬆️
simpeg_drivers/components/models.py 91.47% <100.00%> (+0.02%) ⬆️
simpeg_drivers/joint/driver.py 92.70% <100.00%> (+0.63%) ⬆️
...tricals/direct_current/three_dimensions/forward.py 66.66% <33.33%> (-3.34%) ⬇️
...icals/direct_current/three_dimensions/inversion.py 66.66% <33.33%> (-3.34%) ⬇️
...ectricals/direct_current/two_dimensions/forward.py 70.00% <33.33%> (-2.73%) ⬇️
...tricals/direct_current/two_dimensions/inversion.py 70.00% <33.33%> (-2.73%) ⬇️
...s/induced_polarization/three_dimensions/forward.py 66.66% <33.33%> (-3.34%) ⬇️
...induced_polarization/three_dimensions/inversion.py 66.66% <33.33%> (-3.34%) ⬇️
...als/induced_polarization/two_dimensions/forward.py 70.00% <33.33%> (-2.73%) ⬇️
... and 28 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants