Skip to content

Bugfixes in ParmEst and DoE #3512

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

Merged
merged 7 commits into from
Mar 12, 2025
Merged

Bugfixes in ParmEst and DoE #3512

merged 7 commits into from
Mar 12, 2025

Conversation

djlaky
Copy link
Contributor

@djlaky djlaky commented Mar 10, 2025

Fixes #3372 .

Fixed error in #3372 with suggestion. Ordering appears to be deterministic with new convention.

Also fixed two bugs within pyomo.doe.

Summary/Motivation:

Improving code quality and consistency through bugfixes.

Changes proposed in this PR:

  • Implemented change suggested in Nondeterminism bug in parmest #3372
  • Reverted parameter values in _sequentia_fim function in pyomo.doe to correctly calculate the FIM with finite differencing
  • Changed get_<> functions to be correct. Some were reporting incorrect error messages and populating incorrect values for the results object.
  • Updated testing function to reflect changes. (Testing suffered from the same copy-paste error)

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.

djlaky added 3 commits March 10, 2025 11:15
First bug does not revert the parameter perturbation during sequential FIM computation. Second bug was not properly populating the results object.
Updated tests to match the corrected error messages.
@mrmundt
Copy link
Contributor

mrmundt commented Mar 10, 2025

FYI, @djlaky , we are seeing lots of intermittent failures on Windows/conda setup. Not related to your changes.

@djlaky
Copy link
Contributor Author

djlaky commented Mar 10, 2025

Thanks @mrmundt. This should be ready for review, @blnicho, @jsiirola, @mrmundt.

Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.65%. Comparing base (5d96b24) to head (679f269).
Report is 29 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3512   +/-   ##
=======================================
  Coverage   88.64%   88.65%           
=======================================
  Files         881      881           
  Lines      100918   100919    +1     
=======================================
+ Hits        89461    89467    +6     
+ Misses      11457    11452    -5     
Flag Coverage Δ
builders 26.64% <0.00%> (+<0.01%) ⬆️
default 84.72% <100.00%> (?)
expensive 34.11% <33.33%> (?)
linux 86.08% <100.00%> (-2.31%) ⬇️
linux_other 86.08% <100.00%> (+<0.01%) ⬆️
osx 76.11% <33.33%> (-0.01%) ⬇️
win 84.56% <100.00%> (+<0.01%) ⬆️
win_other 84.56% <100.00%> (+<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.

djlaky and others added 2 commits March 12, 2025 07:13
Added comment to be explicit that dict.fromkeys() is used instead of set() to preserve parameter ordering and thus make the problem deterministic.
Copy link
Member

@jsiirola jsiirola left a comment

Choose a reason for hiding this comment

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

This is fine, but in the future, DoE needs to be gone through and wrapped to 88 columns (for style consistency / black)

@djlaky
Copy link
Contributor Author

djlaky commented Mar 12, 2025

This is fine, but in the future, DoE needs to be gone through and wrapped to 88 columns (for style consistency / black)

Sure thing. I will add this to the list of To-Dos (#3345)

@blnicho blnicho merged commit 4a90ead into Pyomo:main Mar 12, 2025
35 checks passed
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.

Nondeterminism bug in parmest
5 participants