Repository navigation
Conversation
The script declares the solve with problem.configure, deploys the model, waits for the first refresh and prints the report from the deployed model. Status and objective are read through the model's own relationships. The README covers the deployment config, the internal schema grants made before the first run, and re-running.
The solve, with sensitivity analysis, is declared with problem.configure and runs on each refresh of the deployed model. The report reads the plan through Product.x_quantity and checks status, profit, shadow prices, reduced costs and basis status in Python, since model.require checks are not evaluated on a deployed model.
Graph results the report reads are declared with the model, the script deploys it and waits for the first refresh, and the report reads the deployed model. Assembly depth is computed from the enumerated paths and printed; it is no longer written back onto SKU, since a rule defined after the deploy is not part of the deployed model.
Define SKU.assembly_depth at module level as the longest assembly chain ending at each finished good, so it deploys with the model and stays queryable after the run. Restores the README and runbook text that describes the persisted property.
The shadow-price and reduced-cost checks compare the returned key sets with the expected factories and products, so a missing or duplicated row fails instead of passing a row count.
The solve is declared with problem.configure and runs on each refresh of the deployed model. The report reads status and objective through the model's own relationships and the allocation through Allocation.x_spend. The README covers the deployment config, the internal schema grants made before the first run, and re-running.
The solve is declared with problem.configure and runs on each refresh of the deployed model. The report reads status and total conversions through the model's own relationships. The README covers the deployment config, the internal schema grants made before the first run, and re-running.
The solve is declared with problem.configure and runs on each refresh of the deployed model. The report reads status and total cost through the model's own relationships. The README covers the deployment config, the internal schema grants made before the first run, and re-running.
The solve is declared with problem.configure and runs on each refresh of the deployed model. The report reads status and objective through the model's own relationships and the plan through Production.x_quantity. The README covers the deployment config, the internal schema grants made before the first run, and re-running, and its expected output drops the solver-detail lines the script no longer prints.
The solve is declared with problem.configure and runs on each refresh of the deployed model. The report reads status and total revenue through the model's own relationships and the schedules through the template's own variable properties. The README covers the deployment config, the internal schema grants made before the first run, and re-running.
The solve is declared with problem.configure and runs on each refresh of the deployed model. The report reads status and total cost through the model's own relationships and the plan through the template's own variable properties. The README covers the deployment config, the internal schema grants made before the first run, and re-running.
The solve is declared with problem.configure and runs on each refresh of the deployed model. The report reads status and objective through the model's own relationships and keeps the demand-table lookup check. The problem.verify call is removed; the constraints are unchanged. The README covers the deployment config, the internal schema grants and re-running.
The solve is declared with problem.configure and runs on each refresh of the deployed model. The report reads status and objective through the model's own relationships and keeps the OPTIMAL check. The problem.verify call is removed; the constraints are unchanged. The README covers the deployment config, the internal schema grants and re-running.
The solve, with solution_limit for enumeration, is declared with problem.configure and runs on each refresh of the deployed model. The report keeps the per-solution reads and the empty-result branch, and prints the status and number of builds. The problem.verify call is removed; the constraints are unchanged. The README covers the deployment config, the internal schema grants and re-running.
The solve is declared with problem.configure and runs on each refresh of the deployed model. The report reads the status through the model's own relationship and keeps the OPTIMAL check. The problem.verify call is removed; the constraints are unchanged. The README covers the deployment config, the internal schema grants and re-running.
The solve, with solution_limit for enumeration, is declared with problem.configure and runs on each refresh of the deployed model. The report keeps the per-solution reads (populate=False) and the empty-result branch, and prints the status and number of records. The README covers the deployment config, the internal schema grants and re-running.
The solve is declared with problem.configure and runs on each refresh of the deployed model. The derived event type is declared with model.Relationship at module level so it deploys with the model, and the report reads status through the model's own relationship and keeps the OPTIMAL check. The problem.verify call is removed; the constraints are unchanged. The README covers the deployment config and the internal schema grants.
The script deploys the model, waits for the first refresh and prints the report from the deployed model. The README covers the deployment config and re-running.
The script deploys the model, waits for the first refresh and prints the report from the deployed model. The README covers the deployment config and re-running.
The runner deploys the model, waits for the first refresh and prints the item from the deployed model. The README covers the deployment config, re-running, and where a template declares its reasoning relative to the deploy.
The graph, rules and reinsurance solve are declared with the model and run on each refresh of the deployed model; the report reads the cession plan from the deployed model. The solve status is published through a relationship, and the README and docs sidecar cover the deployment config and the configured solve.
The script deploys the model, waits for the first refresh and prints the report from the deployed model. Asset.on_attack_path is now a rule over the kill-chain paths, declared as a Relationship because a Property defined from a path rule fails deployment planning. The README covers the deployment config.
The script deploys the model, waits for the first refresh and prints the report from the deployed model. Feature.max_downstream_depth is declared as a Relationship because a Property defined from a path rule fails deployment planning. The README covers the deployment config.
The script calls model.deploy() on the in-memory DuckDB database before the report queries, which now run under __main__. The config drops auto_deploy, so a query never deploys; the README's How it works and troubleshooting text follow.
Each runner deploys the shared model name with its own motif Problem and reports from it; status comes from a per-runner SolveStatus relationship and the solution count from solve_info().num_points. The README says that running another runner redeploys and replaces the previous runner's motif.
The notebook declares the concepts, the connections relationship, the graph and its betweenness centrality first, then deploys in one model.deploy() cell, then runs the query cells. The note about waiting for the initial sync is gone: the deploy waits for the first refresh. The README covers the deployment config and the model role's read access to the source table.
The solve is declared with problem.configure and runs on each refresh of the deployed model. Status and objective are read through the model's own relationships, and the script keeps accepting OPTIMAL or TIME_LIMIT. The README covers the deployment config, the internal schema grants and re-running; the docs sidecar anchors follow the configure call.
The solve is declared with problem.configure and runs on each refresh of the deployed model. Status and covered population are read through the model's own relationships, and the script keeps accepting OPTIMAL or TIME_LIMIT. The README covers the deployment config, the internal schema grants and re-running.
The solve is declared with problem.configure and runs on each refresh of the deployed model. Status and total deviation are read through the model's own relationships, and the model.require status check becomes a Python check in the report. problem.display() is installed with the model. The README covers the deployment config, the internal schema grants and re-running.
entity_resolution and financial_index_replication name their Problem, so the page anchors match the named constructor. fraud-detection's README now has the deployment Quickstart with a train step, which its page renders only with page.deployment set.
financial_index_replication, test_data_generation and campaign_roi stop when the solve returns no solution instead of exporting, generating from, or dividing by values that do not exist. energy_grid_planning and datacenter_compute_allocation give per-portfolio and per-cell totals a zero default, so a portfolio or cell with no rows in one category keeps its other results. demand_forecasting reads its split dates from the deployed model. Correct the telco runbook's score bridge, the fraud README's setup reference, and outdated comments and README text.
The template pages render only the README lead sections and the generated Quickstart, so the deployed templates' Prerequisites section never appeared while their Quickstart pointed to it. List it in the lead for every deployed template and in the authoring guide. Also align telco's README, model docstring and runbook with the published outputs, drop diet's stale solver-details wording, and correct a report comment in energy_grid_planning.
The deployed model publishes the path count, the routing-tower count and the top influence load, so the prompt asks for those.
The marginal value per added $M and the knee flag are model properties again, derived from the solved portfolio rows, so they can be queried from the deployed model. The knee is the level where the marginal value falls the most. The report reads both instead of computing them.
…olution entity_resolution printed a zero cession plan when the solve returned no solution; it now says there is no plan. product_configurator said no feasible build exists whatever the status; it now says the solver found no build and points to the printed status.
…tier The knee is the level where the marginal value falls the most, with ties going to the smaller budget; a frontier whose marginal value never falls has no knee, and the report says so.
GNN templates train between deploy and query, which the docs site's Quickstart extractor already accepts as an eighth step.
… into coey/templates-deploy-mode-2.1
There was a problem hiding this comment.
🔵 Needs a closer look
The cross-template deployment and GNN migration relies on connected Snowflake/RelationalAI runtime behavior, including refresh ordering and deployment lifecycle, that cannot be independently verified from this source snapshot.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
The model now publishes each factory capacity's shadow price and each product's reduced cost and basis status as relationships, so the report selects them instead of reading the solver's constraint and variable objects.
The model now publishes the options each solution selects as a relationship, so the report selects it instead of reading the solver's per-solution variable values.
The model now publishes each solution's age bucket, plan, and provider as one relationship, so the report selects it instead of reading the solver's per-solution variable values.
The model now defines the match graph's node and edge counts into relationships of its own, so the report selects them instead of reading the graph library's results.
…odel The model now attaches the community, degree centrality, and degree results to Organization, so the queries select published properties instead of reading the graph library's results.
The model now attaches the degree centrality and incoming and outgoing edge counts to Facility, so the queries select published properties instead of reading the graph library's results.
…odel The model now attaches PageRank, degree centrality, and in- and out-degree to DistributionPoint, so the queries select published properties instead of reading the graph library's results.
…gh the model The model now defines the lot genealogy graph's node and edge counts and the diagnosis problem's variable, constraint, objective, and coverage-constraint counts into relationships of its own, so the report selects them instead of reading the graph and solver libraries' results.
The model now publishes each corridor's substations in hop order as a relationship, so the report selects it instead of reading the path search's results.
…h the model The model now attaches reachability and betweenness to SKU, defines the graph's node and edge counts into relationships of its own, and publishes each assembly chain's steps as a relationship, so the report selects them instead of reading the graph and path results.
The model now publishes each kill chain's assets, hops, and total exposure, and each entry-to-target route's assets, as relationships, so the report selects them instead of reading the path search's results.
The model now publishes each dependency path's features in order and each feature's count of downstream paths, so the report selects them instead of reading the path search's results.
The model now defines each site's weakly connected component into a relationship of its own, so the report selects it instead of reading the graph library's result.
… into coey/templates-deploy-mode-2.1
This branch has not been deployed
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.

Runs the templates as deployed models on relationalai 2.1.1, in the layout the docs site's deployed-template pages expect. Stacked on #110 (the move to 2.1.1); review that first.
40 templates are converted. Each ran in its new form on Snowflake (transaction_screening_local on DuckDB), and its results are compared under Results with the same template's run in #110. Not converted lists the rest and why.
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
model/package thatrai models deploy --path modeldeploys:schema.pydeclares the concepts,source.pyloads the data, andreasoning.pyholds the rules, graph relations and Problem.problem.solve(<solver>, **opts)becomesproblem.configure(<solver>, **opts). Each report becomesqueries/<name>.py, run aspython -m queries.<name>; it imports frommodel, declares nothing, and only queries the deployed model. The runner script is gone.train.py, run between the deploy and the query: it trains the GNN over the deployed splits and registers the version thatraiconfig.yamlnames, and a refresh then predicts with it. Values the script derived from the predictions in pandas and fed back into the model are rules over those predictions now, so the Problem reads them in the same refresh. fraud-detection drops its PaySim-table script and keeps the table loader inmodel/source.py; datacenter_compute_allocation drops the--no-gnnfallback and its CSV.demand_forecasts.csv(the Move the templates to relationalai 2.1.1 #110 run printsGNN model not available ... falling back), so the model now reads that file directly and installs without thegnnextra.SolveStatusandTotalCostin diet, defined fromproblem.termination_status()andproblem.objective_value(). The query prints them in place of the solver-detail block fromsolve_info().problem.display()is gone, since printing it from a deployed model needs extra rules deployed with the model.problem.verify(...)returns without error on a deployed model even when the check fails, so it is removed; the constraints it checked are unchanged.raise SystemExit(...)in the query (neverassert, whichpython -Ostrips): factory_production's plan and sensitivity checks, defect_root_cause's formulation audit, book_slate_recommendation's per-user candidate floor, planogram_optimization's demand re-check and pod_placement'sOPTIMALcheck. Input-data checks stoprai models deploy.modelalso loads the local CSVs, so a report that computed figures from them could disagree with the deployed results once the files change. entity_resolution and financial_index_replication now read records, review pairs, returns, benchmark and previous weights from the deployed model.template-docs.yamlexcept portfolio_balancing's (not converted) setspage.deployment: trueand includes the README's Prerequisites in the page's lead.model/andqueries/layout.Three templates call
model.deploy()instead and then report:rai models teardownfails on 2.1.1, so it cannot follow the Quickstart's teardown step.Results
TIME_LIMIT613 instead ofTIME_LIMIT557; both runs stop at the 180 s limit with the best slate found so far.The GNN templates read the same inputs and print the same data summaries as in #110, except that telco_network_recovery counts 7 advisories, one per equipment model as its GNN reads them, where #110 counted the CSV's 8 rows.
TIME_LIMIT653,035,781 instead of 664,676,160, both at the 240 s limit with 16 of 24 scenario cells planned.fraud_detection_local.py, whose loader it keeps: 16 audits in 80 of 80 hours as before, capturing $111,827,688 instead of $60,618,861.OPTIMALplan picks 26 upgrades (179 Gbps) instead of 24 (177 Gbps) within the same budget.Some tables print their rows in a different order, and product_configurator numbers its builds differently.
Not converted
(supplier_id, period_id). Its what-if rules also derive properties of a concept the GNN reads from the GNN's predictions, which fails deploy planning.people.csv(38,984 rows) inline fails with "View definition too large", and a deployed GNN does not find properties whose names contain spaces or parentheses, such asheight(cm).These templates keep their single-script form and run as in #110.
rai-agent-scaffold is removed in #110.
Known limits
python train.pyruns.Relationship, not aProperty, because deploying their path results as Properties fails planning on 2.1.1.AuditCandidate,TowerFailureScore) rather than on the concept the GNN reads, because on 2.1.1 such a model fails deploy planning.[Unsupported Construct Id Type]warning when they deploy and query. Their results are as listed above.SELECTon the table; the README says so.