What's New in Version 1.21.0
Version 1.21.0 of the relationalai Python package is now available!
To upgrade, activate your virtual environment and run the following command:
pip install --upgrade relationalaiNew Features and Enhancements
Section titled “New Features and Enhancements”-
PyRel
1.21.0introduces 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 makingTargeta subtype ofSourceor usingAnyEntitywhen you intentionally allow heterogeneous membership. This example shows one invalid definition and two valid fixes:from relationalai.semantics import AnyEntity, Modelm = 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))