correctly suppress highs output in linopy#622
Conversation
d984ab7 to
d85ce10
Compare
d85ce10 to
a38328c
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #622 +/- ##
==========================================
+ Coverage 80.16% 80.32% +0.15%
==========================================
Files 53 53
Lines 7714 7694 -20
==========================================
- Hits 6184 6180 -4
+ Misses 1530 1514 -16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Tested using https://colab.research.google.com/github/assume-framework/assume/blob/fix_suppress_highs/examples/notebooks/10_DSU_and_flexibility.ipynb and |
|
Hi @maurerle, I am a little confused by the PR, from the changes you proposed, I understand that the code already correctly passed silent options via solver_options, so suppress_output() was redundant and could be removed. Is that correct? Otherwise, it does not seem like you actually changed the pass of the silence args to the highs solver. |
# Pull Request The `suppress_output` method redirects the output buffers. This is generally not a good idea, instead, the underlying source of unwanted output should be tackled. This PR fixes the output from highs in the redispatch market. ## Related Issue This fixes assume-framework#619 as this produced errors in Colab. ## Description There is still a line `Running HiGHS 1.11.0 (git hash: 364c83a): Copyright (c) 2025 HiGHS under MIT licence terms` which is printed for every solving. This is going to be fixed in linopy with PyPSA/linopy#479 ## Changes Proposed - correctly pass the silence args to the highs solver - delete now unused suppress_output function - improve package installation in colab by calling pip less often ## Testing [Describe the testing you've done, including any specific test cases or scenarios] ## Checklist Please check all applicable items: - [ ] Code changes are sufficiently documented (docstrings, inline comments, `doc` folder updates) - [ ] New unit tests added for new features or bug fixes - [ ] Existing tests pass with the changes - [ ] Reinforcement learning examples are operational (for DRL-related changes) - [ ] Code tested with both local and Docker databases - [ ] Code follows project style guidelines and best practices - [ ] Changes are backwards compatible, or deprecation notices added - [ ] New dependencies added to `pyproject.toml` - [ ] A note for the release notes `doc/release_notes.rst` of the upcoming release is included - [x] Consent to release this PR's code under the GNU Affero General Public License v3.0 ## Additional Notes (if applicable) [Any additional information, concerns, or areas you want reviewers to focus on] ## Screenshots (if applicable) [Add screenshots to demonstrate visual changes]
Pull Request
The
suppress_outputmethod redirects the output buffers.This is generally not a good idea, instead, the underlying source of unwanted output should be tackled.
This PR fixes the output from highs in the redispatch market.
Related Issue
This fixes #619 as this produced errors in Colab.
Description
There is still a line
Running HiGHS 1.11.0 (git hash: 364c83a): Copyright (c) 2025 HiGHS under MIT licence termswhich is printed for every solving.This is going to be fixed in linopy with PyPSA/linopy#479
Changes Proposed
Testing
[Describe the testing you've done, including any specific test cases or scenarios]
Checklist
Please check all applicable items:
docfolder updates)pyproject.tomldoc/release_notes.rstof the upcoming release is includedAdditional Notes (if applicable)
[Any additional information, concerns, or areas you want reviewers to focus on]
Screenshots (if applicable)
[Add screenshots to demonstrate visual changes]