Skip to content

What's New in Version 1.21.0

July 13, 20261:26 PM UTC

Version 1.21.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
  • PyRel 1.21.0 introduces a new public preview feature called deploy mode that lets you deploy a PyRel model to a Snowflake schema as SQL tables and views. For more information, see Deploy a model.

  • Improved the clarity of error messages when you define membership between concept types that do not match in Model.define(). Before this release, m.define(Target(Source)) could fail with a generic type-mismatch message that did not tell you how to fix the model. Now the error explains compatible fixes, such as making Target a subtype of Source or using AnyEntity when you intentionally allow heterogeneous membership. This example shows one invalid definition and two valid fixes:

    from relationalai.semantics import AnyEntity, Model
    m = Model("Demo")
    SourceConcept = m.Concept("Order")
    # Invalid: TargetConcept does not extend SourceConcept.
    TargetConcept = m.Concept("NeedsReview")
    m.define(TargetConcept(SourceConcept))
    # Valid fix 1: make the target concept a subtype of SourceConcept.
    TargetSubtype = m.Concept("OrderThatNeedsReview", extends=[SourceConcept])
    m.define(TargetSubtype(SourceConcept))
    # Valid fix 2: use AnyEntity when membership should accept mixed concept types.
    TargetAnyEntity = m.Concept("NeedsReviewAny", extends=[AnyEntity])
    m.define(TargetAnyEntity(SourceConcept))