Skip to content

Python package and CLI 1.38.0

Improved graph reasoning for deployed models.

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==1.38.0"

For the latest installation instructions, see Start building with PyRel.

  • rai models deploy --plan now lets you review planned Snowflake object changes and SQL before deploying a model. It does not deploy the model, but can change Snowflake metadata that the report may not list. Planning is unavailable for local and dry-run configurations. Model deployment is in Public Preview.

  • Model deployment reports now use consistent Snowflake object names, making creation and cleanup steps easier to compare. Generated deployment and teardown SQL preserves required double quotes and includes semicolons for copying into Snowflake SQL scripts, without changing deployment behavior.

  • Deployed models that use graph reasoning can now be refreshed without provisioning a logic reasoner for most graph operations. Some operations, including checking whether nodes are connected by a path and calculating distances, still use the logic reasoner. Graph Reasoning is in Public Preview.

  • rai doctor report now helps you diagnose refresh failures caused by Snowflake ownership changes and suggests SQL permission fixes. It does not change permissions, so review the intended owner and required privileges before applying a suggested fix.

  • Fixed an issue when querying a deployed model with PyRel that caused some queries to return rows that should have been excluded from the results.

  • Fixed incorrect row counts, incorrect totals, and division-by-zero errors in PyRel queries that combine group totals, including calculations of each group’s share of an overall total.

  • Fixed a bug that caused model deployment to fail with Snowflake error 002031, “Unsupported subquery type cannot be evaluated.” The bug occurred in PyRel queries that used not_ to negate a condition on a value that could be missing.

  • Fixed a bug that could lose rows or metadata when deploying a model with recursive rules after changing which values it selects or how its rules are written, even when the expected results were unchanged. Recursive rules build on their own results.

  • Failed deployment checks no longer interrupt queries to a healthy model when no model changes have begun. Preparation errors allow immediate retries, and preparation crashes no longer force unnecessary redeployment once the deployment lock expires.

  • Fixed a bug that could cause a deployment to hang if it wrote to Snowflake dynamic table outputs. If the Snowflake warehouse configured in your PyRel configuration has MAX_CONCURRENCY_LEVEL set to 1, raise it to at least 2 so the refresh procedure and its query can run together. Refresh now reports an error for this setting instead of hanging.

  • Model deployment now names reserved-word concepts consistently, so Order produces "ORDER" across reasoners. Deployment settings also match equivalent quoted and unquoted Snowflake names without changing capitalization rules. Check generated object names when upgrading and update scripts that use changed names.

  • Fixed missing-value handling that could block deployment, redeployment, or teardown through standard Snowflake Python stored procedures. Existing rows incorrectly storing "None" are not repaired, and deployments using compiler.optimization="aggressive" are unchanged.

  • Fixed how query exports handle an unspecified timeout when you use Fragment.into() in a Snowflake Python stored procedure. The export now passes SQL NULL for the timeout instead of Python None.

  • Fixed misleading missing-tag or missing-schema errors when model deployment looks for models in an empty _RELATIONALAI_MODEL_MGMT schema, where PyRel stores model metadata.

  • When custom Snowflake ownership tags block deployment of an older model, the error now provides a SQL template with the required ownership value and identifies the model and metadata schemas. Apply the repair manually only to objects you have verified belong to the model. Update the model’s identity tag last, after the other tag updates succeed.