Add OetcSettings.from_env() and forward solver options through Model.solve()#612
Add OetcSettings.from_env() and forward solver options through Model.solve()#612FabianHofmann wants to merge 5 commits intomasterfrom
Conversation
…solve() - Add from_env() classmethod to OetcSettings for env var configuration - Forward solver_name and solver_options from Model.solve() to OetcHandler - Update _submit_job_to_compute_service to take explicit solver params - Replace hasattr checks with direct attribute access - Add 27 tests covering env var resolution, type parsing, and integration
|
@FabianHofmann Not sure if it makes sense to expose
|
yes, they have lower priority
thanks for the quick message, removing those |
Changes proposed in this Pull Request
OetcSettings.from_env()classmethod: Support environement variables:OETC_EMAIL,OETC_PASSWORD,OETC_AUTH_URL,OETC_ORCHESTRATOR_URL,OETC_NAME,OETC_SOLVER,OETC_SOLVER_OPTIONS,OETC_CPU_CORES,OETC_DISK_SPACE_GB,OETC_COMPUTE_PROVIDER,OETC_DELETE_WORKER_ON_ERROR-I know that is a lot, perhaps @KristijanFaust-OET can have a look which of them make sense to expose.
Forward
solver_nameand**solver_optionsfromModel.solve()to the OETC handler: When callingm.solve(remote=handler, solver_name="gurobi", TimeLimit=100), solver options are now forwarded tosolve_on_oetc()and merged with the settings-level options (call-time options take precedence). A merged copy is created each time to avoid mutating the handler's settings.Checklist
doc.doc/release_notes.rstof the upcoming release is included.