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

Subprocess Timeout Update #3183

Merged
merged 2 commits into from
Mar 8, 2024
Merged

Conversation

mrmundt
Copy link
Contributor

@mrmundt mrmundt commented Mar 7, 2024

Fixes #3064

Summary/Motivation:

We have a hard-coded timeout of 1 second for system call solvers. This PR updates that to 2, but also puts that timeout in a private-esque attribute so users can adjust it, if necessary.

Changes proposed in this PR:

  • Create self._version_timeout attribute on SystemCallSolver
  • Set default to 2

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.

@mrmundt mrmundt requested a review from jsiirola March 7, 2024 19:02
@@ -19,6 +19,7 @@

from pyomo.common import Executable
from pyomo.common.collections import Bunch
from pyomo.common.errors import ApplicationError
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI - I added this because, when I opened the file on my IDE, it immediately warned me that ApplicationError was used in the file but hadn't been imported.

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.38%. Comparing base (56a8380) to head (78431b7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3183   +/-   ##
=======================================
  Coverage   88.38%   88.38%           
=======================================
  Files         846      846           
  Lines       94974    94978    +4     
=======================================
+ Hits        83941    83947    +6     
+ Misses      11033    11031    -2     
Flag Coverage Δ
linux 86.33% <100.00%> (-0.01%) ⬇️
osx 75.74% <100.00%> (-0.41%) ⬇️
other 86.52% <100.00%> (-0.01%) ⬇️
win 83.81% <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.

@michaelbynum michaelbynum merged commit 0cc323a into Pyomo:main Mar 8, 2024
33 checks passed
@jsiirola
Copy link
Member

jsiirola commented Mar 8, 2024

I am playing catch up here. I think it would be useful to move the "named constant" to a module-level constant (and not an instance attribute) that all the solvers can share. We might even integrate it into a global "Pyomo options" ConfigDict

@michaelbynum
Copy link
Contributor

Why shouldn't it be instance specific? I don't think I have an opinion, I'm just trying to understand the reasoning.

@jsiirola
Copy link
Member

jsiirola commented Mar 8, 2024

The original 1-second timeout is generally OK for all solvers and situations. The most likely reason to change it is because you are on a platform where things are significantly slower (in a slow VM on a busy machine, working against an NFS share, on a platform with a particularly onerous virus scanner, etc). In that case, the "slow down" is likely to be endemic to the platform - so you would want to extend the timeout globally for all solvers.

@mrmundt mrmundt deleted the subprocess-timeout branch August 20, 2024 14:40
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.

["scip.exe", "--version"] timed out after 1 second
4 participants