Skip to content

Fix solver selection fallback and invalid PyOptInterface exception handling#135

Open
RiyanshiTomar wants to merge 2 commits intoGeomScale:developfrom
RiyanshiTomar:develop
Open

Fix solver selection fallback and invalid PyOptInterface exception handling#135
RiyanshiTomar wants to merge 2 commits intoGeomScale:developfrom
RiyanshiTomar:develop

Conversation

@RiyanshiTomar
Copy link

Solved : #134

-> Add a resolve_solver_name() helper and use it in fba, fva, inner_ball, set_model, and remove_redundant_facets to centralize default-solver resolution and only apply the default when no solver is explicitly provided.

->Replace invalid except poi.TerminationStatusCode.* handlers with generic exception handling that raises contextual RuntimeErrors for FBA, FVA, and redundant-facet removal so underlying errors are not masked.

->Propagate the solver choice from the MetabolicNetwork into PolytopeSampler.get_polytope() when the sampler's _parameters["solver"] is None, and pass the resolved solver_name into remove_redundant_facets() so preprocessing uses the intended solver.

Description
-> Add resolve_solver_name() helper to centralize default solver resolution

-> Propagate solver choice from MetabolicNetwork to PolytopeSampler preprocessing

-> Replace invalid exception handlers catching enum values with proper RuntimeError

-> Surface underlying solver errors instead of masking them with print statements

Please merge this pull request.

…-error-handling

Fix solver selection fallback and invalid PyOptInterface exception handling
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.

1 participant