Skip to content

What's New in Version 1.21.2

July 16, 20266:50 PM UTC

Version 1.21.2 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
  • Improved the errors you get when deploying a model that uses reasoning not yet supported in deploy mode. Before this release, deploying a model that used prescriptive optimization (Problem) or predictive (GNN) reasoning could fail in a confusing way. Now PyRel raises a clear NotImplementedError explaining that these reasoners are not yet supported in deploy mode and telling you to remove the deployment configuration if you need them.

  • The starter project created by rai models init now runs its deploy step with rai models deploy --wait, so the first deployment finishes before you query. Before this release, the generated project could return empty results if you queried before that first deployment completed.

  • Fixed a crash when re-deploying a model with rai models deploy where a rule reads a column from a table loaded without an explicit schema. Before this release, re-deploying such a model failed with a ValueError: Cannot translate removal of <column>, even though no column had actually been removed. Now PyRel recognizes that the model is unchanged and the re-deploy completes successfully.

  • PyRel now reports an error when a concept inherits conflicting identities from more than one parent concept. Before this release, PyRel accepted this and could build a model that behaves incorrectly. Now PyRel raises an Incompatible identify_by relations error that names the two conflicting parents.

    To fix it, define the identity once on a shared parent that both concepts extend:

    from relationalai.semantics import Model, String
    m = Model("Demo")
    # Rejected: X and Y each define their own identity, so Z cannot inherit both.
    X = m.Concept("X", identify_by={"x_id": String})
    Y = m.Concept("Y", identify_by={"y_id": String})
    # PyRel raises:
    # Concept Z has supertypes with incompatible identify_by relations: X vs Y
    Z = m.Concept("Z", extends=[X, Y])
    # Fixed: define the identity once on a shared parent, Base.
    # A and B inherit their identity from Base, so C gets one consistent identity.
    Base = m.Concept("Base", identify_by={"id": String})
    A = m.Concept("A", extends=[Base])
    B = m.Concept("B", extends=[Base])
    C = m.Concept("C", extends=[A, B])
  • Fixed rai models pull so it reports a conflict instead of building an invalid model. Before this release, pulling branch changes into a shared model could introduce duplicate property names and cause an error at query time. Now pull raises a conflict error when a branch would introduce a property-name collision, so you can resolve the conflict before continuing.

  • Fixed std.re.findall() when you call it on a table column. For each row’s value, findall() returns every match together with its position (1, 2, 3, and so on) in the value. Before this release, the position counted up across the whole column instead of restarting for each row, and rows with no match were dropped. Now the position restarts at 1 for each row, and rows with no match are kept.