-
Notifications
You must be signed in to change notification settings - Fork 50
Convert timed mipgap to use termination callback mechanics #810
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
Open
bknueven
wants to merge
13
commits into
main
Choose a base branch
from
generalize-timed-mipgap
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2f57af4
converted timed mipgap to use termination callback mechanics
e7c54a9
reimplement gurobi callback as class
0247b06
implement better screen trace for small and large values
6170492
better integration of timed_mipgap
74f6056
adding callback in pre_solve
6a515dd
simplify timed_mipgap options
6ec0b02
update documentation for autogapper
1d3c68a
Merge branch 'main' into generalize-timed-mipgap
bknueven b80925b
update test for timed mipgap
17a5404
add test for progress log
574b2fc
add tests for timed mipgap
0ee6fef
Merge branch 'main' into generalize-timed-mipgap
bknueven 2d17eb0
Merge branch 'main' into generalize-timed-mipgap
DLWoodruff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| ############################################################################### | ||
| # mpi-sppy: MPI-based Stochastic Programming in PYthon | ||
| # | ||
| # Copyright (c) 2024, Lawrence Livermore National Security, LLC, Alliance for | ||
| # Sustainable Energy, LLC, The Regents of the University of California, et al. | ||
| # All rights reserved. Please see the files COPYRIGHT.md and LICENSE.md for | ||
| # full copyright and license information. | ||
| ############################################################################### | ||
| """Tests for adaptive trace formatting in cylinders.hub.""" | ||
|
|
||
| import unittest | ||
|
|
||
| from mpisppy.cylinders.hub import Hub | ||
|
|
||
|
|
||
| class TestTraceFormatting(unittest.TestCase): | ||
| def test_fixed_format_is_preserved(self): | ||
| self.assertEqual(Hub._format_trace_value(123.4567, 14, 4), " 123.4567") | ||
|
|
||
| def test_small_values_switch_to_scientific(self): | ||
| self.assertIn("e", Hub._format_trace_value(1.2e-8, 14, 4)) | ||
| self.assertIn("e", Hub._format_trace_value(-4.9e-5, 14, 4)) | ||
|
|
||
| def test_large_values_switch_to_scientific(self): | ||
| self.assertIn("e", Hub._format_trace_value(1234567890.0, 14, 4)) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| unittest.main() |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.