Skip to content

Conversation

djlaky
Copy link
Contributor

@djlaky djlaky commented Oct 1, 2025

Fixes # .

Added code to compute the Hessian in the condition number number case (ME-opt) instead of using pass. Also, update condition number objective to be log-scale to avoid numerical issues.

Summary/Motivation:

Numerical issues caused a delay for adding this. We figured out the numerical issues and this is good to go from the math side.

Changes proposed in this PR:

  • Make condition number option for Pyomo.DoE using GreyBox objective use the log of the condition number
  • Add hessian computation to the condition number option (instead of pass being used)

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

Copy link
Member

@blnicho blnicho left a comment

Choose a reason for hiding this comment

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

@djlaky I'm a little surprised at how minimal the changes were in test_greybox. The coverage hasn't been reported yet but could you explain why you didn't need to add a new test for this?

Copy link

codecov bot commented Oct 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.33%. Comparing base (918824e) to head (87491a7).
⚠️ Report is 30 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3740      +/-   ##
==========================================
+ Coverage   89.31%   89.33%   +0.02%     
==========================================
  Files         896      896              
  Lines      103687   103752      +65     
==========================================
+ Hits        92609    92688      +79     
+ Misses      11078    11064      -14     
Flag Coverage Δ
builders 29.09% <26.04%> (-0.01%) ⬇️
default 85.93% <100.00%> (?)
expensive 35.85% <26.04%> (?)
linux 86.98% <97.91%> (-2.07%) ⬇️
linux_other 86.98% <97.91%> (+0.02%) ⬆️
osx 83.04% <1.04%> (-0.06%) ⬇️
win 85.22% <97.91%> (+<0.01%) ⬆️
win_other 85.22% <97.91%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

Fixed typo in comment

Co-authored-by: Bethany Nicholson <[email protected]>
@djlaky
Copy link
Contributor Author

djlaky commented Oct 1, 2025

@djlaky I'm a little surprised at how minimal the changes were in test_greybox. The coverage hasn't been reported yet but could you explain why you didn't need to add a new test for this?

It looks like my one additional test didn’t make it in a commit, I will add this shortly. It will naturally all be covered because we call the jacobian and hessian methods at each solve, but I do have a check hessian for the condition number. My next commit(s) will include this. I must have not pushed them with the PR.

@djlaky
Copy link
Contributor Author

djlaky commented Oct 1, 2025

Also, while checking over this PR to make sure it made sense, I found a small bug in the Hessian computation. Please hold off on this one until I add more commits. Apologies @blnicho.

@djlaky
Copy link
Contributor Author

djlaky commented Oct 3, 2025

Also, while checking over this PR to make sure it made sense, I found a small bug in the Hessian computation. Please hold off on this one until I add more commits. Apologies @blnicho.

@blnicho this one is good to go now. The test should be added and the hessian bug fixed.

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants