Python package and CLI 2.1.0
Retrain some GNN models after upgrading.
How to install this version
Review the changes below before installing. To install this version, activate a compatible Python virtual environment and run:
python -m pip install "relationalai==2.1.0"For the latest installation instructions, see Install and run PyRel.
New Features and Enhancements
Section titled “New Features and Enhancements”-
Model deployment now shows what changed when a reviewed plan is out of date. The “Deployment refused” error from
Model.deploy()andrai models deploy --reviewed-plannow includes a line-by-line diff between your reviewed plan and the current plan, so you no longer have to compare plan files yourself. -
Predictive reasoning now fails right away, instead of retrying for several minutes, when your
reasoners.predictivesettings inraiconfig.yamldon’t match an existing predictive reasoner. Out-of-memory errors from training or generating predictions now also suggest a larger predictive reasoner size.
Bug Fixes
Section titled “Bug Fixes”-
Fixed an issue that caused a registered Graph Neural Network (GNN) model in predictive reasoning to sometimes stop working after you added another
Graphto the same PyRel model. After you upgrade, retrain and re-register each GNN model registered with an earlier PyRel version, unless you passed your own edge concept to itsGraphwithedge_concept=. -
Fixed an issue that caused top N and ranking queries that sort from highest to lowest, using
limit()orrank()withdesc(), to return missing (NULL) values first in their results when model deployment is enabled. The SQL that PyRel sends to Snowflake now sorts missing values last. If a deployed model’s outputs use these queries, deploy the model again with PyRel 2.1.0 to pick up the fix. -
Fixed an issue that caused tearing down a deployed model with
rai models teardownorModel.teardown()to fail in some Snowflake accounts. Teardown failed with an “Insufficient privileges” error when the account had models deployed by roles whose tables your role can’t read, and it also failed in databases with more than 10,000 schemas. Teardown now checks only the model you’re tearing down, so it’s also faster in large accounts. -
Fixed an issue that caused interrupting a PyRel query or deployment to stop PyRel but not the SQL that PyRel had started in Snowflake. With model deployment enabled, this happened when you pressed Ctrl-C or interrupted a notebook cell. That SQL could keep running in Snowflake and using your warehouse. PyRel now also asks Snowflake to stop that SQL. Interrupt only once, because a second interrupt can leave the SQL running. To confirm that it stopped, check your Snowflake query history.
-
Fixed an issue that caused the logic reasoner to keep working on a deployed model’s output refresh after the refresh was cancelled, including when you tore down or redeployed the model. The work kept running until it timed out. It now stops on its own, usually about a minute after the refresh is cancelled. To get this fix for a model deployed with an earlier PyRel version, deploy it again with PyRel 2.1.0.