Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Irls refactor #1349

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

Irls refactor #1349

wants to merge 41 commits into from

Conversation

domfournier
Copy link
Contributor

@domfournier domfournier commented Feb 4, 2024

Summary

Refactoring of the UpdateIRLS directive used to control the Sparse regularization.

  • Attribute name changes to snake_case format
  • Remove unused attributes and change to instance attributes.
  • Move responsibility for the scaling of spherical parameters into a new SphericalDomain directive.
  • Move responsibility for the cooling schedule to a BetaSchedule directive.

PR Checklist

  • [x ] If this is a work in progress PR, set as a Draft PR
  • Linted my code according to the style guides.
  • Added tests to verify changes to the code.
  • Added necessary documentation to any new functions/classes following the
    expect style.
  • Marked as ready for review (if this is was a draft PR), and converted
    to a Pull Request
  • [x ] Tagged @simpeg/simpeg-developers when ready for review.

Reference issue

Related to restructuring proposed on #1327

What does this implement/fix?

Reduces complexity of current Update_IRLS class + PEP8 standard.

Additional information

Clean up deprecation warnings on #1472

@domfournier
Copy link
Contributor Author

domfournier commented Feb 4, 2024

Sorry for the messy commit history. Pycharm went a bit nuts on the imports.

Copy link

codecov bot commented Feb 4, 2024

Codecov Report

Attention: Patch coverage is 92.60700% with 19 lines in your changes are missing coverage. Please review.

Project coverage is 82.67%. Comparing base (079d870) to head (1888e6b).

Files Patch % Lines
simpeg/directives/_regularization.py 92.24% 19 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1349       +/-   ##
===========================================
+ Coverage   66.89%   82.67%   +15.78%     
===========================================
  Files         169      170        +1     
  Lines       25747    25805       +58     
===========================================
+ Hits        17223    21335     +4112     
+ Misses       8524     4470     -4054     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@santisoler
Copy link
Member

Sorry for the messy commit history. Pycharm went a bit nuts on the imports.

No worries! We can Squash and Merge and clean it up later.

I see a few tests failing. Do you want me to review it now @domfournier? Or are you still working on it?

@domfournier
Copy link
Contributor Author

Hi @santisoler , yes let me fix those. I can ping you when I am done with it. Errors are mostly related to examples using deprecated arguments, which I should handle more gracefully right here.

Are we ok with updating the tests/examples for suppress the warnings after, on a separate PR?

@santisoler
Copy link
Member

Hi @santisoler , yes let me fix those. I can ping you when I am done with it. Errors are mostly related to examples using deprecated arguments, which I should handle more gracefully right here.

Sounds good!

Are we ok with updating the tests/examples for suppress the warnings after, on a separate PR?

It would be ok to update the examples here as well. But we can totally handle them in a separate PR if you feel we need to change a lot of them.

# Conflicts:
#	SimPEG/directives/directives.py
@domfournier domfournier added this to the 0.22.0 milestone Apr 3, 2024
@domfournier
Copy link
Contributor Author

ready for review @simpeg/simpeg-developers

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

Successfully merging this pull request may close these issues.

None yet

2 participants