Skip to content

Run the templates as deployed models - #111

Open
chriscoey wants to merge 380 commits into
coey/templates-relationalai-2.1from
coey/templates-deploy-mode-2.1
Open

chriscoey wants to merge 380 commits into
coey/templates-relationalai-2.1from
coey/templates-deploy-mode-2.1

Conversation

@chriscoey

@chriscoey chriscoey commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Runs every template as a deployed model on relationalai 2.3.0, in the layout the docs site's deployed-template pages expect. Stacked on #110 (the move to 2.1.1); review that first.

All 53 templates pin relationalai 2.3.0. 51 deploy with rai models deploy; simple-start, transaction_screening_local and fraud-detection's fraud_detection_rules.ipynb call deploy() from Python. Each ran in its new form on Snowflake (transaction_screening_local on DuckDB): every deploy, train.py, query and notebook. Results compares the outputs with #110's runs.

To read the diff, start with diet for the layout, subscriber_retention for train.py, and any template's README Quickstart for the steps a user follows.

What changed

  • Layout. A template's model is a model/ package that rai models deploy --path model deploys: schema.py declares the concepts, source.py loads the data, and the rules, graph relations and Problems follow, in reasoning.py for most templates. problem.solve(<solver>, **opts) becomes problem.configure(<solver>, **opts). Each report becomes queries/<name>.py, run as python -m queries.<name>; it imports from model and reads the deployed results.
  • GNN templates (datacenter_compute_allocation, demand_forecasting, fraud-detection, memory_supply_allocation, retail_planning, smoker_status_prediction, subscriber_retention, telco_network_recovery) add train.py, run between the deploy and the query. It trains the GNN over the deployed splits and registers the version that raiconfig.yaml names, and a refresh then predicts with it. Where a template feeds predictions into a Problem, the values it derived from them in pandas are rules over the predictions, so the Problem reads them in the same refresh.
  • Templates with several solves declare every solve in the model, including hospital_staffing's and portfolio_balancing's frontiers, whose later solves read earlier solve results.
  • Status and objective are published through each template's own relationships, for example SolveStatus and TotalCost in diet, defined from problem.termination_status() and problem.objective_value(). The queries print them. A report stops, or skips a scenario, with a message when a solve it needs returned no solution.
  • Checks on solved results stay where the README teaches them, as an explicit raise SystemExit(...) in the query (never assert). Input-data checks in source.py can stop rai models deploy.
  • Queries read the deployment. Several figures a report used to recompute from the local CSVs, such as plan totals and graph metrics, are rules in the model.
  • Graphs are named, so deployed object names stay stable across deploys.
  • READMEs follow the deployed-template Quickstart; the GNN templates' Quickstarts add the train.py step and PAT-user access for the GNN jobs. The five template-docs.yaml files set page.deployment: true. The contributor docs describe the model/ and queries/ layout.
  • Streamlit apps (disease-outbreak-prevention, humanitarian-aid-supply-chain, wildlife-conservation-network) query the deployed model.

A review of each template against its #110 script also fixed energy_grid_planning's low-carbon check, which scaled generation by 100, and corrected README statements to match the code.

Results

Templates
Same results as in #110 ad_spend_allocation, bom-reachability, campaign_roi, cell_tower_coverage, commercial_underwriting, cybersecurity-attack-paths, defect_root_cause, demand_planning_temporal, diet, disease-outbreak-prevention, entity_resolution, factory_production, financial_index_replication, humanitarian-aid-supply-chain, it-dependency-mapping, network_flow_planning, planogram_optimization, product_configurator, production_planning, retail_markdown, sample-template, shipment_compliance, supply_chain_transport, synthetic_eligibility_records, test_data_generation, transaction_screening_local, underwriting_audit, warehouse_allocation, water_allocation
Another equally valid result cicd_runner_allocation, money_laundering_motif_detection (the smurf-army search stops at its limit of 5 cohorts and returns another 5; the other two motifs are the same), patient_cohort_recruitment, pod_placement, shift_assignment, sprint_scheduling, supplier_reliability, synthetic_order_lifecycle, traveling_salesman (the same tour in the other direction), and portfolio_balancing, supply_chain_resilience and wildlife-conservation-network (the same groups under other numbers). hospital_staffing's knee and first six frontier points match; at zero unmet demand the best-service anchor's overtime cost is $1,932 (was $2,268), one of several optimal values, since that solve minimizes unmet demand only.
Different result energy_grid_planning: the same plan (OPTIMAL 1,562,600,000), but 1 of 10 data-center requests is compliant instead of 2, from the low-carbon fix above; Louvain finds 3 regions instead of 4. book_slate_recommendation: a different time-limit incumbent, TIME_LIMIT 577 instead of 557; both stop at the 180 s limit.
A newly trained GNN the eight GNN templates (below)

simple-start and fraud-detection's fraud_detection_rules.ipynb ran clean; #110 kept no notebook output to compare them with.

  • datacenter_compute_allocation: TIME_LIMIT 632,672,721 instead of 664,676,160, both at the 240 s limit with 16 of 24 scenario cells planned.
  • demand_forecasting: the same splits, with test RMSE 7.4661 per sale instead of 7.3167, and 159.2 per city, family and week instead of 162.5.
  • fraud-detection, against Move the templates to relationalai 2.1.1 #110's fraud_detection_local.py, whose loader it keeps: 16 audits in 80 of 80 hours as before, capturing $111,685,519 instead of $60,618,861.
  • memory_supply_allocation: three OPTIMAL plans at 45.41B, 40.46B and 28.92B instead of 46.14B, 41.10B and 29.41B.
  • retail_planning, against Move the templates to relationalai 2.1.1 #110's retail_planning_local.py: both problems OPTIMAL, revenue $60,942.48 instead of $62,477.99 and cost $6,599.60 instead of $9,488.61.
  • smoker_status_prediction: test ROC-AUC 0.8491 instead of 0.8475, accuracy 0.7648 instead of 0.7620.
  • subscriber_retention: test RMSE 0.1388 instead of 0.1405.
  • telco_network_recovery: 139 towers are critical instead of 142, and the OPTIMAL plan picks 24 upgrades as before. The report counts 7 advisories, one per advised equipment model, where Move the templates to relationalai 2.1.1 #110 counted the CSV's 8 rows.

Some tables print their rows in a different order, and enumerations number their solutions differently.

Known limits

  • Checks on solved results run when a query runs, not in a refresh, so anything else that reads the published results should read the solve status first.
  • Problem.verify(...) raises NotImplementedError on a deployed model, so the templates that called it no longer re-check the returned solution; the constraints themselves are unchanged.
  • A value computed from a solution sits on the template's own relationship or a separate concept (cell_tower_coverage's TowerLoad, portfolio_balancing's per-solve concepts), not on the concept the solve reads.
  • In the same way, fraud-detection, telco_network_recovery, retail_planning, datacenter_compute_allocation and memory_supply_allocation keep values derived from the GNN's predictions on a separate concept from the one the GNN reads.
  • cybersecurity-attack-paths and it-dependency-mapping declare a path result as a Relationship, not a Property.
  • A rank computed on the Logic engine sorts all its keys in one direction. telco_network_recovery ranks by the negated score and then the id (aggs.rank(-score, id)), so an exact tie still goes to the smallest id.
  • For the deployed GNN, memory_supply_allocation adds a surrogate id, and smoker_status_prediction renames columns such as height(cm). smoker_status_prediction also inlines its 38,984 people rows in four batches, since one inline table of that size failed deploy with "View definition too large".
  • underwriting_audit reports zero witnesses for its infeasible audit.
  • book_slate_recommendation, datacenter_compute_allocation, defect_root_cause, energy_grid_planning, entity_resolution, fraud-detection, memory_supply_allocation, patient_cohort_recruitment, portfolio_balancing, supply_chain_resilience, telco_network_recovery and warehouse_allocation print relationalai's [Unsupported Construct Id Type] warning when they query.
  • transaction_screening_local deploys into DuckDB, where rai models teardown fails, so it has no teardown step.
  • simple-start reads its source table as the model role, so that role needs SELECT on the table; the README says so.
  • The READMEs link the early-access setup page for deployed models, which covers the governed setup, the PAT user and the prescriptive grants.
  • Inherited from the original scripts and unchanged here:
    • demand_planning_temporal withdraws every unit of demand from inventory, including demand the plan leaves unmet.
    • supply_chain_resilience counts the same inbound flow toward every order for the same site and SKU.
    • supplier_reliability, cicd_runner_allocation and shift_assignment create a demand, assignment or coverage constraint only where a supply lane, compatible online runner or available worker exists.
    • After a globally optimal solve, datacenter_compute_allocation labels a scenario cell with no assignment INFEASIBLE, although an empty allocation is feasible.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The templates docs preview for this pull request has been deployed to Vercel!

✅ Preview: https://relationalai-docs-e0mes5gg1-relationalai.vercel.app/build/templates
🔍 Inspect: https://vercel.com/relationalai/relationalai-docs/2k7XvvMPo3mXpXxvkLMXGtL6Xbqx

@chriscoey
chriscoey marked this pull request as ready for review November 14, 2026 04:06
@chriscoey
chriscoey requested a balanced review from Copilot November 14, 2026 04:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The walkthrough exceeds the six-step sidecar limit, and the starter Quickstart directs contributors to download a ZIP that is not published.

2 open issues
What changed in this PR

Builds on #110’s RelationalAI 2.1.1 upgrade by moving 35 templates to deployed-model execution, aligning their layout with the documentation site’s deployed-template pages.

Changes:

  • Moves model declarations, reasoning, and solver configuration into model/, with separate reports under queries/.
  • Publishes solve status and objectives, moves result checks into reports, and makes Streamlit apps read deployed results and edges.
  • Updates deployment instructions, runbooks, documentation metadata, and contributor guidance.
File Description
wildlife-conservation-network/​runbook.md Updates model, report, and app paths.
wildlife-conservation-network/​queries/​community_report.py Reads deployed community metrics.
wildlife-conservation-network/​model/​__init__.py Packages network declarations and graph metrics.
wildlife-conservation-network/​model_setup.py Removes the model factory.
wildlife-conservation-network/​app.py Queries deployed metrics and partnerships.
water_allocation/​runbook.md Documents refresh-driven solving and report paths.
water_allocation/​queries/​flow_allocations.py Checks solve status and reports flows.
water_allocation/​model/​__init__.py Configures deployed solving and publishes results.
warehouse_allocation/​runbook.md Documents deployed graph-to-solve execution.
warehouse_allocation/​queries/​allocation_report.py Reports graph analysis and checked allocations.
warehouse_allocation/​model/​__init__.py Packages graph analysis and allocation solving.
traveling_salesman/​runbook.md Updates solve workflow and paths.
traveling_salesman/​queries/​tour.py Checks model size, status, and tour coverage.
traveling_salesman/​model/​__init__.py Publishes entity counts and solve results.
transaction_screening_local/​transaction_screening_local.py Explicitly deploys to DuckDB before reporting.
transaction_screening_local/​README.md Documents explicit local deployment.
tests/​test_refactored_template_contracts.py Points the evaluation check at the report module.
test_data_generation/​queries/​test_data_plan.py Reads deployed row counts and generates samples.
synthetic_order_lifecycle/​queries/​order_trace.py Checks status and prints deployed event traces.
synthetic_order_lifecycle/​model/​__init__.py Configures deployed trace generation.
synthetic_eligibility_records/​queries/​eligibility_records.py Reports generated records with status handling.
synthetic_eligibility_records/​model/​__init__.py Configures deployed multi-solution generation.
supply_chain_transport/​runbook.md Updates model and report paths.
supply_chain_transport/​queries/​transport_plan.py Reports checked transport and inventory results.
supply_chain_transport/​model/​__init__.py Configures solving and publishes transport cost.
simple-start/​README.md Documents notebook deployment and source permissions.
shipment_compliance/​runbook.md Updates the model path.
shipment_compliance/​queries/​compliance_report.py Queries deployed compliance classifications.
shipment_compliance/​model/​__init__.py Separates compliance declarations from reporting.
shift_assignment/​runbook.md Documents refresh-driven solving and new paths.
shift_assignment/​queries/​shift_assignments.py Checks status and reports scenario assignments.
shift_assignment/​model/​__init__.py Configures deployed assignment solving.
sample-template/​template.py Removes the starter runner.
sample-template/​template-docs.yaml Adds deployment metadata and query references.
sample-template/​README.md Introduces the deployed-template Quickstart.
sample-template/​queries/​item_report.py Adds the starter’s deployed-model report.
sample-template/​model/​__init__.py Documents package deployment.
retail_markdown/​runbook.md Updates model and report paths.
retail_markdown/​queries/​markdown_plan.py Reports checked discounts, sales, and revenue.
retail_markdown/​model/​__init__.py Configures deployed markdown optimization.
README.md Describes model packages and query workflows.
production_planning/​runbook.md Updates scenario, model, and report paths.
production_planning/​queries/​production_plan.py Reports checked production quantities.
production_planning/​model/​__init__.py Configures solving and publishes profit.
product_configurator/​runbook.md Documents deployed multi-solution execution.
product_configurator/​queries/​feasible_builds.py Reports feasible builds and no-result cases.
product_configurator/​model/​__init__.py Configures deployed build enumeration.
pod_placement/​runbook.md Updates deployment and verification descriptions.
pod_placement/​queries/​placement_report.py Reports checked placements and resource usage.
pod_placement/​model/​__init__.py Configures solving and publishes placement totals.
planogram_optimization/​runbook.md Documents deployed solving and report paths.
planogram_optimization/​queries/​facings_plan.py Checks demand lookups against deployed data.
planogram_optimization/​model/​__init__.py Configures solving and publishes total demand.
patient_cohort_recruitment/​runbook.md Updates model and report paths.
patient_cohort_recruitment/​queries/​cohort_report.py Reports checked cohort and coverage results.
patient_cohort_recruitment/​model/​__init__.py Packages cohort reasoning and solver configuration.
network_flow_planning/​runbook.md Updates model and report paths.
network_flow_planning/​queries/​network_plan.py Reports checked facility and flow decisions.
network_flow_planning/​model/​__init__.py Configures solving and publishes network cost.
it-dependency-mapping/​model/​__init__.py Declares paths and downstream-depth rules.
humanitarian-aid-supply-chain/​runbook.md Corrects documented centrality values and paths.
humanitarian-aid-supply-chain/​queries/​distribution_point_ranking.py Reads deployed rankings and network metrics.
humanitarian-aid-supply-chain/​model/​__init__.py Packages the weighted network and graph metrics.
humanitarian-aid-supply-chain/​model_setup.py Removes the model factory.
humanitarian-aid-supply-chain/​app.py Queries deployed rankings and supply routes.
financial_index_replication/​template-docs.yaml Adds deployment metadata and updates walkthrough references.
financial_index_replication/​runbook.md Documents reasoning and report responsibilities.
financial_index_replication/​README.md Documents deployment, refresh, and accepted statuses.
financial_index_replication/​model/​reasoning.py Declares portfolio optimization and published results.
financial_index_replication/​model/​__init__.py Loads reasoning and exports report symbols.
factory_production/​runbook.md Updates model and report paths.
entity_resolution/​template-docs.yaml Updates deployment metadata and reasoning references.
entity_resolution/​runbook.md Aligns prompts with deployed-model responsibilities.
entity_resolution/​README.md Documents deployment setup and report execution.
entity_resolution/​model/​source.py Loads candidate counts into the model.
entity_resolution/​model/​schema.py Declares the candidate-count relationship.
entity_resolution/​model/​reasoning.py Packages clustering, exposure rules, and cession solving.
entity_resolution/​model/​__init__.py Exports deployed reasoning and report symbols.
disease-outbreak-prevention/​runbook.md Corrects documented centrality values and paths.
disease-outbreak-prevention/​queries/​facility_ranking.py Reads deployed facility metrics.
disease-outbreak-prevention/​model/​__init__.py Packages the risk-weighted network and metrics.
disease-outbreak-prevention/​model_setup.py Removes the model factory.
disease-outbreak-prevention/​app.py Queries deployed metrics and facility connections.
diet/​runbook.md Documents refresh-driven solving and new paths.
diet/​queries/​diet_plan.py Checks status and reports scenario diets.
diet/​model/​__init__.py Configures solving and publishes diet cost.
defect_root_cause/​runbook.md Updates deployment and report entry points.
cybersecurity-attack-paths/​model/​__init__.py Packages attack paths and derived asset flags.
CONTRIBUTING.md Defines model-package and query responsibilities.
commercial_underwriting/​runbook.md Updates the model path.
cell_tower_coverage/​runbook.md Documents deployed solving and report paths.
campaign_roi/​runbook.md Updates model and report paths.
campaign_roi/​queries/​budget_reallocation.py Reports checked budgets using deployed campaign data.
campaign_roi/​model/​__init__.py Configures solving and publishes conversion totals.
book_slate_recommendation/​runbook.md Documents time-limited results and new paths.
bom-reachability/​model/​__init__.py Packages graph analysis and assembly-depth rules.
ad_spend_allocation/​runbook.md Updates model and report paths.
ad_spend_allocation/​queries/​spend_allocation.py Checks status and reports scenario spending.
ad_spend_allocation/​model/​__init__.py Configures solving and publishes conversion totals.
.github/​prompts/​review-template.prompt.md Updates review guidance for query modules.
.github/​prompts/​create-template-readme.prompt.md Updates README guidance to name queries.
.github/​prompts/​cleanup-template-code.prompt.md Separates model reasoning from report queries.
.agents/​skills/​template-authoring/​SKILL.md Updates authoring guidance for deployed templates.
.agents/​skills/​template-authoring/​resources/​template-docs.md Defines deployment metadata and seven-step Quickstarts.

Review effort: Balanced

Comment thread sample-template/README.md Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Snowflake permissions, refresh execution, and solver publication require connected validation unavailable here, while the inaccessible docs contract leaves deployment-sidecar compatibility unverified.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@chriscoey
chriscoey marked this pull request as draft November 14, 2026 19:35
…n report

Move the model into model/ (deployed with `rai models deploy --path model`),
training into train.py, which trains over the deployed splits and registers
the version that `reasoners.predictive.gnns.churn_risk` names, and the
report into queries/churn_report.py (`python -m queries.churn_report`). The
GNN takes its experiment and registry location from the deployment, and its
device from the predictive reasoner's size.

A deployed GNN needs concrete types on its task relationships, so the Train
and Val relationships carry a Float risk.

Rewrite the README Quickstart as the deployment steps with a train step:
download, environment, install, configure, deploy, train (then refresh),
query, tear down. The data summary now reads from the deployed model, and
the expected output is from a deployed run.
…reasoning modules

The model package declares the facility concepts, loads the sample data,
and states the risk weight and graph metrics in separate modules. The
app still imports the same names from the package.
… modules

The report reads the solve status and objective from the SolveStatus
and TotalProfit relationships the model defines, and no longer prints
the formulation or checks the termination status.
…asoning modules

The report reads the solve status from the SolveStatus relationship the
model defines, and no longer prints the formulation or the solver details.
…d reasoning modules

The model package declares the distribution point concepts, loads the
sample data, and states the flow weight and graph metrics in separate
modules. The app still imports the same names from the package.
…modules

The report no longer checks the termination status before printing the
diagnosis.
…d reasoning modules

The report and the app output are unchanged.
… into coey/templates-deploy-mode-2.1

# Conflicts:
#	financial_index_replication/financial_index_replication.py
#	financial_index_replication/template-docs.yaml
…asoning modules

The report no longer prints the formulation or checks the termination
status before printing the slate.
… order

The report prints the solve status and objective from the SolveStatus
and TotalResidual relationships the model defines, as the non-deployed
template did, and the model package no longer needs an import-order
exception.
…modules

The report no longer checks the termination status before printing the
cession plan. The package imports are in sorted order.
…emplates-deploy-mode-2.1

# Conflicts:
#	financial_index_replication/README.md
Move the model into model/ (deployed with `rai models deploy --path model`)
and the report into queries/energy_grid_report.py
(`python -m queries.energy_grid_report`). The model is split into schema,
source, and reasoning modules. The Problem is named and configured with
HiGHS, and its status and objective are published through relationships the
report reads. The report no longer prints the formulation, and its marginal
analysis and knee point are computed from the InvestmentPortfolio rows it
reads.

Stage 1 reads the bundled demand_forecasts.csv. The optional GNN block did
not feed any later stage (it only printed a line when a model loaded and
otherwise fell back to the CSV), so it is removed together with the `gnn`
extra, and the template no longer lists predictive reasoning.

Rewrite the README Quickstart as the deployment steps: download,
environment, install, configure, deploy, query, tear down. Update the runbook
and the README references to the single script.
Move the model into model/ (deployed with `rai models deploy --path model`),
training into train.py, which trains over the deployed splits and registers
the version that `reasoners.predictive.gnns.equipment_failure` names, and the
report into queries/recovery_report.py (`python -m queries.recovery_report`).
The GNN takes its experiment and registry location from the deployment, and
its device from the predictive reasoner's size.

The equipment predictions now feed the rest of the chain inside the model:
per-tower failure intensity is a rule over the predictions (a TowerFailureScore
concept, since the GNN reads the tower table), the critical-tower rule and the
upgrade problem read it, and the upgrade problem runs on HiGHS as part of each
refresh. The plan summary is derived from the selected upgrades and published
with the solve status and objective. The call-path enumeration moves into the
model as well, since a deployed model only has the path tables its own rules
ask for, and the report prints the path and tower counts with the hub's
highest influence load. Task relationships get concrete types and
every GNN column a feature type.

Rewrite the README Quickstart as the deployment steps with a train step:
download, environment, install, configure, deploy, train (then refresh),
query, tear down.
Move the reasoning into model/reasoning.py (deployed with
`rai models deploy --path model`), training into train.py, which trains over
the deployed splits and registers the version that
`reasoners.predictive.gnns.fraud_classifier` names, and the report into
queries/fraud_report.py (`python -m queries.fraud_report`). The GNN takes its
experiment and registry location from the deployment, and its device from the
predictive reasoner's size.

The alert score is a rule over the GNN predictions and the audit problem runs
on HiGHS as part of each refresh, so one refresh scores the test transfers and
selects the audits; the solve status and objective are published by the model.
The score and the audit decision belong to a separate AuditCandidate concept,
one per scored transfer: the GNN reads the Transaction table, so properties of
Transaction derived from its predictions made the predictions depend on
themselves and the deploy failed in planning. The GNN's property transformer
also drops the sender and receiver relationship columns.

The model package calls the bundled-CSV loader on import; the Snowflake-table
loader stays in model/source.py, and the runbook and README describe swapping
it in. Task relationships get concrete types and every GNN column a feature
type.

Rewrite the README Quickstart as the deployment steps with a train step:
download, environment, install, configure, deploy, train (then refresh),
query, tear down. The docs sidecar points at the new files.
- The allocation report exits with the termination status when the solve
  publishes no total holding cost, instead of printing a plan without
  one.
- README: the description says cross-region route flags, the outputs
  include the SiteComponent relationship, and the runbook bullet refers
  to the code in model/.
- README: for Snowflake-backed runs, replace each model.data(...) source
  in model/source.py with model.Table(...) and rewrite the input checks
  there, which read the CSVs with pandas.
- README: the flow report lists only connections carrying more than
  0.001 units, which is why some connections are missing from it.
A benchmark month with no stock returns is written with a blank replica
return again, instead of stopping the report.
The sample generator needs a solved row count for every bundled table;
a missing one is an error again rather than a successful exit.
The data-flow diagram shows one MIP over all budget levels, and the
amortization note includes the reported marginal value per step.
The skill floor applies when a shift has an availability row for a
skilled nurse; if all such rows are unavailable the solve is infeasible.
The report's no-knee message names the actual condition.
Only solves with a return floor publish a shadow price; the anchors do
not.
Shift capacities can also make the joint solve infeasible, and a shift
with no available workers gets no coverage requirement.
…rt direction

The Logic engine's rank refuses mixed ascending and descending keys, so the deploy failed. Ties now go to the largest subscriber id and path id.
…gain

Rank by the negated score with the id ascending, which keeps one sort direction for the Logic engine and restores the documented tie-break.
The docs site builds the template page from the README Quickstart and
rejects angle brackets inside inline code, so the train step's refresh
call names the database as DB again, as it did before.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The solve-result guard permits unsuccessful Ipopt outcomes, allowing the report to read flow allocations and exit successfully even when no valid allocation was published.

1 open issue

Review effort: Balanced

…ough

The docs site requires a walkthrough step to mention its code references
in source order. The report's model.select() call comes before the
marginal_risk_per_return column it selects, so the prose now names them
in that order.
An unsuccessful status such as LOCALLY_INFEASIBLE passed the guard, so
the report printed an empty flow table and exited 0. It now raises, as
diet does for a status other than OPTIMAL.
Ipopt reports LOCALLY_INFEASIBLE, and the report now stops with the
termination status before printing its Status line.

This branch has not been deployed

No deployments
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.

2 participants