Skip to content

GEOPY-2866: Research auto-scaling strategy for cross-gradient regularization terms#411

Open
domfournier wants to merge 8 commits into
release/GA_4.8from
GEOPY-2866
Open

GEOPY-2866: Research auto-scaling strategy for cross-gradient regularization terms#411
domfournier wants to merge 8 commits into
release/GA_4.8from
GEOPY-2866

Conversation

@domfournier
Copy link
Copy Markdown
Collaborator

@domfournier domfournier commented May 21, 2026

GEOPY-2866 - Research auto-scaling strategy for cross-gradient regularization terms

Copilot AI review requested due to automatic review settings May 21, 2026 19:51
@github-actions github-actions Bot changed the title Geopy 2866 GEOPY-2866: Research auto-scaling strategy for cross-gradient regularization terms May 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an optional “iterative rescaling” mechanism for joint cross-gradient inversions, wiring it through options/UI and adjusting expected run-test targets to reflect the updated regularization behavior.

Changes:

  • Add iterative_rescaling parameter to JointCrossGradientOptions (default enabled) and expose it in the UI schema.
  • Modify cross-gradient multiplier scaling logic and (when enabled) add a SimPEG directive to rescale cross-gradient terms during iterations.
  • Update joint cross-gradient run-test target metrics to match the new inversion behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
tests/run_tests/driver_joint_cross_gradient_test.py Updates expected inversion metrics (targets) for the joint cross-gradient run test.
simpeg_drivers/joint/joint_cross_gradient/options.py Introduces the iterative_rescaling option (and documents it).
simpeg_drivers/joint/joint_cross_gradient/driver.py Adjusts cross-gradient scaling and appends an iterative scaling directive when enabled.
simpeg_drivers-assets/uijson/joint_cross_gradient_inversion.ui.json Exposes iterative_rescaling as a UI-configurable parameter.
Comments suppressed due to low confidence (1)

simpeg_drivers/joint/joint_cross_gradient/options.py:51

  • iterative_rescaling defaults to True, which changes the cross-gradient scaling behavior for existing projects/options files that don't specify this new field: previously the multiplier always included a base_length**4 dimensional scaling, but with the new default it will not. If this is intended, consider calling it out explicitly in release notes; otherwise set the default to preserve legacy behavior (e.g., default False and let the UI enable it explicitly).
    cross_gradient_weight_a_b: float = 1.0
    cross_gradient_weight_c_a: float | None = None
    cross_gradient_weight_c_b: float | None = None

    iterative_rescaling: bool = True
    models: JointModelOptions = JointModelOptions()

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

Comment thread simpeg_drivers/joint/joint_cross_gradient/options.py Outdated
Comment thread simpeg_drivers/joint/joint_cross_gradient/driver.py Outdated
Comment thread simpeg_drivers-assets/uijson/joint_cross_gradient_inversion.ui.json
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.40%. Comparing base (0edfe9d) to head (0078ea1).

Files with missing lines Patch % Lines
...impeg_drivers/joint/joint_cross_gradient/driver.py 75.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           release/GA_4.8     #411      +/-   ##
==================================================
- Coverage           90.43%   90.40%   -0.04%     
==================================================
  Files                 110      110              
  Lines                6532     6542      +10     
  Branches              826      830       +4     
==================================================
+ Hits                 5907     5914       +7     
- Misses                413      414       +1     
- Partials              212      214       +2     
Files with missing lines Coverage Δ
...mpeg_drivers/joint/joint_cross_gradient/options.py 100.00% <100.00%> (ø)
...impeg_drivers/joint/joint_cross_gradient/driver.py 88.23% <75.00%> (-4.63%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

benk-mira
benk-mira previously approved these changes May 22, 2026
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.

3 participants