Skip to content

Add error message to Nelder-Mead optimizer when user cost function returns NaN value#635

Open
henrygerardmoore wants to merge 2 commits intoargmin-rs:mainfrom
henrygerardmoore:clarify_nelder_mead_nan_error
Open

Add error message to Nelder-Mead optimizer when user cost function returns NaN value#635
henrygerardmoore wants to merge 2 commits intoargmin-rs:mainfrom
henrygerardmoore:clarify_nelder_mead_nan_error

Conversation

@henrygerardmoore
Copy link
Copy Markdown

Hello, I just had a bug in my cost function where it returned NaN and got the unreachable point error in the Nelder-Mead optimizer. Of course this is my fault 😁 but I thought it'd be nice to have an error message directly stating this since it's the only case I can think of that should hit that unreachable point message so that a user that makes my same mistake in the future can see exactly why they got it without debugging.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.68%. Comparing base (b300285) to head (9619de3).

Files with missing lines Patch % Lines
crates/argmin/src/solver/neldermead/mod.rs 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #635      +/-   ##
==========================================
- Coverage   91.72%   91.68%   -0.04%     
==========================================
  Files         177      177              
  Lines       20840    20849       +9     
==========================================
  Hits        19116    19116              
- Misses       1724     1733       +9     

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

🚀 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