Skip to content
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

Timing improvements #1939

Merged
merged 4 commits into from
Apr 20, 2021
Merged

Timing improvements #1939

merged 4 commits into from
Apr 20, 2021

Conversation

jsiirola
Copy link
Member

@jsiirola jsiirola commented Apr 20, 2021

Fixes # N/A

Summary/Motivation:

This improves two timing-related issues in Pyomo:

  • the test_timing.py have been somewhat fragile. This PR disables the GC during the tests to hopefully reduce the test-to-test variability
  • This does an overhaul of the polling interval used by TeeStream to poll more aggressively at the beginning of the subprocess and then slower as the process proceeds. This reduces the overhead that TeeStream adds to short-running processes. This partially addresses platform runtime differences observed in Long runtimes on Windows for code using parameter estimate IDAES/idaes-pse#293.

Changes proposed in this PR:

  • Move polling to leverage a "sliding scale" for both processing output and thread cleanup
  • Disable GC during pyomo.common.timing tests

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.

@codecov
Copy link

codecov bot commented Apr 20, 2021

Codecov Report

Merging #1939 (f06132e) into main (c17ab1c) will increase coverage by 0.00%.
The diff coverage is 94.44%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1939   +/-   ##
=======================================
  Coverage   80.12%   80.12%           
=======================================
  Files         569      569           
  Lines       71841    71852   +11     
=======================================
+ Hits        57560    57572   +12     
+ Misses      14281    14280    -1     
Impacted Files Coverage Δ
pyomo/common/tee.py 91.63% <94.44%> (+0.80%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c17ab1c...f06132e. Read the comment docs.

@jsiirola jsiirola merged commit 4f6f523 into Pyomo:main Apr 20, 2021
@jsiirola jsiirola deleted the faster-timing branch April 21, 2021 16:04
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.

2 participants