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

New TerminationReason definition #316

Merged
merged 2 commits into from
Jan 19, 2023
Merged

Conversation

relf
Copy link
Contributor

@relf relf commented Jan 18, 2023

This PR implements a new version of TerminationReason enum as discussed here.

It introduces the variant SolverExit(String) which allows to define custom stopping reason and SolverConverged which is intended to gather all successful exit reasons under the same umbrella.

Some unwanted implementation consequences:

  • TerminationReason is not Copy anymore (TerminationStatus as well)
  • We "loose" information when several successful exits are possible for a solver

@codecov-commenter
Copy link

Codecov Report

Base: 93.39% // Head: 93.36% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (41cbaca) compared to base (1caaf44).
Patch coverage: 58.46% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #316      +/-   ##
==========================================
- Coverage   93.39%   93.36%   -0.04%     
==========================================
  Files         119      119              
  Lines       19012    18986      -26     
==========================================
- Hits        17756    17726      -30     
- Misses       1256     1260       +4     
Impacted Files Coverage Δ
argmin/src/core/state/mod.rs 100.00% <ø> (ø)
argmin/src/solver/brent/brentroot.rs 0.97% <0.00%> (ø)
...n/src/solver/gaussnewton/gaussnewton_linesearch.rs 92.69% <0.00%> (ø)
...rgmin/src/solver/gaussnewton/gaussnewton_method.rs 96.52% <0.00%> (ø)
argmin/src/solver/goldensectionsearch/mod.rs 95.29% <0.00%> (ø)
argmin/src/solver/neldermead/mod.rs 94.31% <0.00%> (ø)
argmin/src/solver/quasinewton/sr1.rs 76.50% <0.00%> (ø)
argmin/src/solver/quasinewton/sr1_trustregion.rs 72.25% <0.00%> (ø)
argmin/src/solver/simulatedannealing/mod.rs 85.65% <0.00%> (-0.72%) ⬇️
argmin/src/solver/trustregion/steihaug.rs 60.55% <0.00%> (ø)
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@stefan-k stefan-k left a comment

Choose a reason for hiding this comment

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

Thanks a lot, I really appreciate all the work!!

@stefan-k stefan-k merged commit fc1a707 into argmin-rs:main Jan 19, 2023
@relf relf deleted the refactor-reason branch January 19, 2023 08:40
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.

None yet

3 participants