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

Fragile try/except logic in MIS #3407

Open
blnicho opened this issue Nov 7, 2024 · 0 comments
Open

Fragile try/except logic in MIS #3407

blnicho opened this issue Nov 7, 2024 · 0 comments

Comments

@blnicho
Copy link
Member

blnicho commented Nov 7, 2024

This issue stems from a comment in PR #3403 posted by @jsiirola in #3403 (review)

The MIS implementation uses a bare (catch-all) "except:" clause when guarding against non-zero solver return codes. This could suppress any number of errors and there would be no way to know what was going on. It would be good to revisit this and see if the bare "except:" can be removed.

    try:
        results = solver.solve(modified_model, tee=tee)
    except:
        results = None

Code from this file: https://github.com/bknueven/pyomo/blob/57f5e06d9549b58099f98b35072f35ded3f50419/pyomo/contrib/iis/mis.py#L285-L288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant