Skip to content

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:

Terminal window
python -m pip install "relationalai==2.1.0"

For the latest installation instructions, see Install and run PyRel.

  • Fixed an issue that caused a registered Graph Neural Network (GNN) model in predictive reasoning to sometimes stop working after you added another Graph to 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 its Graph with edge_concept=.

  • Fixed an issue that caused top N and ranking queries that sort from highest to lowest, using limit() or rank() with desc(), 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 teardown or Model.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.