Skip to content

Suppress warmstart message from Xpress#3599

Merged
mrmundt merged 2 commits intoPyomo:mainfrom
bknueven:xpress_warmstart_msg
May 13, 2025
Merged

Suppress warmstart message from Xpress#3599
mrmundt merged 2 commits intoPyomo:mainfrom
bknueven:xpress_warmstart_msg

Conversation

@bknueven
Copy link
Copy Markdown
Contributor

@bknueven bknueven commented May 7, 2025

Fixes # N/A

Summary/Motivation:

On main, when using warmstart = True with Xpress, you will always see the below message printed to the screen:

User solution (_) stored.

which is emitted by the addmipsol method of xpress.problem. This can be troublesome because (1) the message is printed to the screen unconditionally and (2) does not end up in a specified logfile.

Changes proposed in this PR:

  • Delay calling XpressDirect._warm_start until the model is about to be solved, when the logfile and / or tee attributes have been properly configured.

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.

Comment thread pyomo/solvers/plugins/solvers/xpress_direct.py Outdated
Co-authored-by: Miranda Mundt <[email protected]>
@codecov
Copy link
Copy Markdown

codecov bot commented May 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.76%. Comparing base (457f436) to head (8aa76b0).
⚠️ Report is 961 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3599      +/-   ##
==========================================
- Coverage   88.76%   88.76%   -0.01%     
==========================================
  Files         891      891              
  Lines      102297   102303       +6     
==========================================
+ Hits        90802    90805       +3     
- Misses      11495    11498       +3     
Flag Coverage Δ
builders 26.62% <33.33%> (+<0.01%) ⬆️
default 84.87% <33.33%> (?)
expensive 33.99% <33.33%> (?)
linux 86.55% <100.00%> (-1.96%) ⬇️
linux_other 86.55% <100.00%> (+<0.01%) ⬆️
osx 82.84% <100.00%> (+<0.01%) ⬆️
win 84.74% <100.00%> (-0.01%) ⬇️
win_other 84.74% <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.

Copy link
Copy Markdown
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.

Tests would be nice, but given that we are moving away from this interface, I don't think they are required.

@mrmundt mrmundt merged commit 5ee4159 into Pyomo:main May 13, 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.

4 participants