Skip to content

What's New in Version 1.29.0

August 28, 20263:56 PM UTC

Version 1.29.0 of the relationalai Python package is now available!

To upgrade, activate your virtual environment and run the following command:

Terminal window
pip install --upgrade relationalai
  • Queries that use path() to find paths in a graph now compile and run faster, especially patterns that repeat a step a bounded number of times with .repeat(min, max). In one benchmark, compiling a large repeated pattern dropped from over a minute to under a second, with no change to results.

  • Display strings for constraints and objectives now work when the model runs in Snowflake: the prescriptive reasoner renders them inside the model instead of in the Python client. The rendered text is available as a display_string property. Call install_display_strings() on a Problem before you deploy it (interactive use installs it automatically on the first display()).

  • Deploying a model that schedules automatic refreshes with rai models deploy now warns you when the Snowflake role that owns the refresh tasks lacks the account-level EXECUTE TASK privilege. Before, the deploy reported success but the refresh never ran, so the tables stayed empty with no explanation. The warning names the role and the exact grant needed to fix it.

  • In a deployed model, several aggregate queries that used to fail with the message Unsupported subquery type cannot be evaluated or return wrong results now work correctly. This includes grouped aggregates (.per()), aggregates capped with aggregates.limit, and aggregates used inside a not_() check.

  • In a deployed model, rank() now groups rows correctly when the same definition also contains an unrelated aggregate that uses a fallback value. Before, every row could land in its own group, so the rank was 1 for every row. This produced silently wrong results with no error.

  • After you deploy with op log recording turned off, rai models list and the related branch, switch, and teardown commands now work as expected.

  • rai models deploy --wait now makes a new model version visible to other users of the model as soon as its Snowflake objects are installed, rather than after the first data refresh finishes.

  • Deploying a model no longer fails when a concept has multiple identifying properties and one of them has no values. That property now deploys as an empty table.

  • When you set deployment.outputs.reasoner on a model that also defines a prescriptive Problem, the deploy no longer skips outputting the problem. It keeps the solver’s outputs in place, routes only the outputs it can, and warns about the ones it left alone.

  • Querying a model in a Snowflake notebook no longer shows stray error cards (such as [Invalid iteration] Cannot iterate over Chain objects.) underneath a query that actually succeeded. These came from the notebook inspecting PyRel objects left in the namespace. Real errors from your own code still appear.

  • Calling AnyEntity.ref() no longer raises an UnresolvedType error and now works as expected.

  • Deploying a model whose objects are Snowflake dynamic tables and that also uses the logic reasoner no longer shows warnings about dynamic tables or rebuilds them as regular tables.

  • Problem.display() no longer accepts part= or where=. Passing either now raises a TypeError. To filter what you see, first render the display text with install_display_strings(), then read the new display_string property from the constraint (or other expression) you want, just like any other field:

    problem.install_display_strings()
    # capacity_constraint is a constraint you defined when building the problem
    model.select(capacity_constraint.name, capacity_constraint.display_string).where(capacity_constraint.name == "cap_3")

    Output is now sorted as plain text instead of natural number order, so x_1, x_2, x_10 now appears as x_1, x_10, x_2.

  • all_different now takes a single argument.