Skip to content

Conversation

shermanjasonaf
Copy link
Contributor

@shermanjasonaf shermanjasonaf commented Sep 23, 2025

Summary/Motivation:

This PR modifies the PyROS solver output logging system so that the output shown by the default logger (or any other INFO-level logger) is simplified.

Changes proposed in this PR:

  • Log the following at DEBUG, rather than INFO level: (i) full PyROS solver config, (ii) backup solver invocations, (iii) subproblem solve failures for the master feasibility and DR polishing problems, (iv) timing profile, (v) component statistics for the preprocessed model
  • Add indication of backup solver invocation to the (INFO-level) iteration log table
  • Log component statistics for the un-preprocessed model at INFO level
  • Update tests and documentation according to the new changes

TODO

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.

@shermanjasonaf
Copy link
Contributor Author

Copy link

codecov bot commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 96.63866% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.33%. Comparing base (e8ed5dd) to head (cca2ef7).

Files with missing lines Patch % Lines
pyomo/contrib/pyros/separation_problem_methods.py 88.88% 2 Missing ⚠️
pyomo/contrib/pyros/master_problem_methods.py 66.66% 1 Missing ⚠️
pyomo/contrib/pyros/pyros.py 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3732      +/-   ##
==========================================
+ Coverage   89.31%   89.33%   +0.02%     
==========================================
  Files         896      896              
  Lines      103697   103774      +77     
==========================================
+ Hits        92619    92709      +90     
+ Misses      11078    11065      -13     
Flag Coverage Δ
builders 29.09% <13.44%> (+<0.01%) ⬆️
default 85.94% <95.79%> (?)
expensive 35.85% <13.44%> (?)
linux 86.98% <96.63%> (-2.07%) ⬇️
linux_other 86.98% <96.63%> (+0.02%) ⬆️
osx 83.11% <95.79%> (+0.01%) ⬆️
win 85.23% <96.63%> (+<0.01%) ⬆️
win_other 85.23% <96.63%> (+<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.

* **Preprocessing information** (lines 35--37):
Wall time required for preprocessing
the deterministic model and associated components,
i.e., standardizing model components and adding the decision rule
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
i.e., standardizing model components and adding the decision rule
e.g., standardizing model components and adding the decision rule

I think you mean e.g. ("such as") here? (It's possible I am reading it incorrectly, though)

Comment on lines +3303 to +3304
# for some fields, we choose floats with more than four
# four decimal points to ensure rounding also matches
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# for some fields, we choose floats with more than four
# four decimal points to ensure rounding also matches
# for some fields, we choose floats with more than four
# decimal points to ensure rounding also matches

Comment on lines +3339 to +3340
# for some fields, we choose floats with more than four
# four decimal points to ensure rounding also matches
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# for some fields, we choose floats with more than four
# four decimal points to ensure rounding also matches
# for some fields, we choose floats with more than four
# decimal points to ensure rounding also matches

Comment on lines +3594 to +3595
Test method for logging config user values logs
nothing if all values are set to default.
Copy link
Contributor

Choose a reason for hiding this comment

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

The grammar here is weird enough that I'm not actually sure what the sentence is supposed to mean.

Comment on lines +251 to +253
# note: first clause of logical expression
# accounts for bug(?) causing an iterate
# of user_values to be the config dict itself
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this related to #3721? If so, it might be worthwhile to put that issue number in here so people can go read more about it.

@mrmundt mrmundt moved this from Todo to Review In Progress in Pyomo 6.9.5 Release Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Review In Progress
Development

Successfully merging this pull request may close these issues.

4 participants