Make trio + telco templates compatible with PyRel 1.11#84
Merged
Conversation
Bump factory_production, supplier_reliability, cicd_runner_allocation,
and telco_network_recovery to relationalai==1.11.0 and fix the
incompatibilities that surfaced.
- Strip mismatched short_name= in telco (PyRel 1.11 rejects a short_name
that differs from its LHS attribute at model-build). Removed the 5
mismatched args; PyRel now derives each name from the attribute. Every
other short_name= in v1/ already matches its attribute and is untouched.
- Fix solve() signature: Problem.solve() now requires solver as a
positional arg. telco's problem.solve() -> problem.solve("gurobi"),
preserving the HiGHS fallback. The trio already used solve("highs", ...).
- Pins: trio (==1.9.0) and telco (==1.8) -> ==1.11.0; README SDK lines aligned.
Validated end-to-end on relationalai==1.11.0 with no [Invalid short name]
errors: telco pipeline complete, factory_production/supplier_reliability
OPTIMAL, cicd_runner_allocation baselines OPTIMAL + intentional conflict demo.
|
The docs preview for this pull request has been deployed to Vercel!
|
The Gurobi-unavailable troubleshooting note still described the pre-1.11 'engine's configured solver picks up by default' behavior. Under 1.11 the script explicitly requests gurobi first, so update the prose to match.
chriscoey
approved these changes
Jun 9, 2026
chriscoey
left a comment
Member
There was a problem hiding this comment.
Approving — clean, well-scoped 1.11 bump. I dug into the two real changes and ran the templates to confirm.
Verified
- The
short_name=removals are safe: in 1.11.0 relations are keyed by object identity, not by name string, soNetworkPerformance.for_towerandTowerUpgradeOption.for_towerboth deriving the"for_tower"display name don't collide. The five removed values aren't referenced anywhere else inv1/. solve()in 1.11.0 isdef solve(self, solver: str, *, …)—solveris positional-or-keyword, so theexceptfallbacksolve(solver="highs")is valid.- Ran the trio end-to-end on
relationalai==1.11.0: factoryOPTIMAL, profit 200000+ sensitivity; supplierOPTIMAL, obj 4850+ scenarios (-C=6750,-B=5150); cicdOPTIMALbaselines (0.5x/1.0x/1.5x = $10.18/$9.62/$9.53) + the intentionalCONFLICT_FOUND/IIS. All match the PR description. I didn't stand up telco's full GNN pipeline locally (needs change-tracking +EXP_DATABASE), so I'm relying on your telco run for Stage 4 — its model build passes here, so the short_name change is fine.
Non-blocking nits (fine to merge as-is):
telco_network_recovery/README.md:57— the prerequisite bullet still says HiGHS fallback happens "if gurobi is not configured." With the newsolve("gurobi"), fallback only fires when the engine raises a matching error, not when the engine is simply configured for HiGHS. The troubleshooting block at line 369 was updated to match; this earlier bullet reads stale. Maybe: "if gurobi is unavailable or unlicensed, the script catches the solver error and falls back to HiGHS automatically."- The fallback filter (
telco_network_recovery.py:892) keys on the substring"unavailable"but not"not available", and it now runs on every gurobi-unconfigured solve rather than only genuine license failures — and it's the one branch neither run exercised (yours solved on gurobi, my trio runs don't touch telco). Worth a glance that your engine's gurobi-missing message actually matches the keyword set, else theelse: raisehard-fails instead of falling back. - Minor: the comment at
telco_network_recovery.py:882("engine-configured for licensed deployments") reads slightly stale now that the call passes"gurobi"literally rather than deferring to engine config. - Optional: the inline
solve(sensitivity=True)/solve(conflict=True)shorthand in the trio READMEs isn't literally runnable under 1.11 (missing the now-required solver) — reads fine as illustrative shorthand, your call whether to tighten.
Nice cleanup.
The Gurobi-fallback branch keyed on a hand-listed keyword set (missing
'not available' among others) and, with solve("gurobi") now requesting
gurobi on every run, was the one path neither validation run exercised --
an unmatched gurobi-missing message would hit 'else: raise' and hard-fail.
Catch any gurobi solve failure and retry HiGHS instead; if HiGHS also
fails (e.g. a genuine model issue) that error propagates. Verified both
paths end-to-end: gurobi happy path and a forced-failure fallback both
reach the same OPTIMAL plan.
Also align the stale prerequisite bullet (README:57) and the solve-block
comment with the explicit solve("gurobi") call.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps
factory_production,supplier_reliability,cicd_runner_allocation, andtelco_network_recoverytorelationalai==1.11.0and fixes the incompatibilities that surfaced.Changes
short_name=— PyRel 1.11 rejects ashort_name=that differs from its LHS attribute at model-build ([Invalid short name]). Removed the 5 mismatched args intelco_network_recovery.py(performance_for_tower,cdr_caller,cdr_callee,cdr_routed_through,upgrade_for_tower); PyRel now derives each name from the attribute. Each value was used only in its own declaration. Every othershort_name=inv1/already matches its attribute and is left untouched.solve()signature —Problem.solve()now requiressolveras a positional arg. telco'sproblem.solve()(which relied on the removed engine-default) →problem.solve("gurobi"), preserving the existing HiGHS fallback. The trio already usedsolve("highs", ...).==1.9.0) and telco (==1.8) →==1.11.0; README SDK requirement lines aligned.Validation
All four run end-to-end on
relationalai==1.11.0, no[Invalid short name]errors:CONFLICT_FOUND/IIS demo