Runner: Improve robustness in solver results parsing#490
Runner: Improve robustness in solver results parsing#490danielelerede-oet wants to merge 16 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
eantonini
left a comment
There was a problem hiding this comment.
Everything looks good from my side. Thanks for improving the robustness in result parsing.
siddharth-krishna
left a comment
There was a problem hiding this comment.
Sorry for the extremely slow review! This looks great and will improve our benchmarking robustness, thank you. Now that all v2 runs are complete we can merge this in. :)
|
@eantonini the CI failure appears to be indeed related to the changes introduced in this PR. Before these changes, some cases were apparently not classified as errors, whereas they are now reported with In particular, the sample benchmark job fails because One idea could be to update the CI logic to account for these cases too. cc @siddharth-krishna |
|
@danielelerede-oet If it is only one sample problem that fails, you can remove it from the CI. |
Not really. There are two issues affecting GLPK and SCIP:
|
|
@eantonini the problem with SCIP is only related to the linopy version in our test environment. The newest release (0.8.0) is already parsing SCIP outputs correctly. Given that my PR to fix GLPK objective parsing has been merged, I would wait for the newest release to update the env (cc @siddharth-krishna ) |
Summary
This PR improves the robustness and correctness of solver result handling in
run_solver.py, ensuring that invalid or incomplete solver runs are not misclassified as successful and that result parsing is safe across solver backends.Motivation
During benchmarking, several issues were identified in how solver results were interpreted:
"unknown") could still be reported as successfulsolver_model is None) could lead to crashes or invalid metric extractionThese issues could lead to misleading benchmark results and inconsistent behaviour across solvers.
Changes
1. Improve classification of solver runs
"unknown","error","failed"or"aborted"are now classified asER2. Preserve valid warning runs
"status": "warning"are no longer discarded automaticallyER3. Handle missing solver models
solver_modelisNone4. Fix MILP metrics extraction
get_milp_metricsnow explicitly receivessolver_name5. Restrict MILP metric computation to MIP problems
6. Improve robustness of helper functions
get_duality_gapandis_mip_problemnow safely handle missing solver models7. Fix issues in HiGHS-HiPO runner
solver_name)Impact
"warning"status