Python package and CLI 2.4.0
Drops support for Python 3.10 and requires Python 3.11 through 3.14
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.4.0"For the latest installation instructions, see Install and run PyRel.
New Features and Enhancements
Section titled “New Features and Enhancements”-
Model deployment can now place managed Snowflake views in
public_schema(the model-output schema) orinternal_schema(where PyRel stores deployment metadata and internal objects). Setdeployment.placementinDeploymentConfigto choose the default, or override it per view. Placement ininternal_schemais unavailable with platform orchestration or aggressive SQL optimization. Moving a view removes its old copy, so direct grants do not carry over. -
Custom naming functions can now choose Snowflake object names based on each object’s destination schema (
public_schemaorinternal_schema) withObjectNameRequest.placement. TheObjectNameRequest.scopeproperty identifies whether an object is public or internal.placementidentifies the schema where PyRel creates it. If a naming function omitsplacement, PyRel uses the schema it would normally assign based onscope, so existing functions remain compatible. -
Prescriptive reasoning can now compile some large decision models faster, including ones with many types of constraints. Results vary by workload, so a speedup is not guaranteed for every model.
-
Predictive reasoning now shows when your training job is queued and hides log lines from the job ahead in the queue while it waits. During long waits, PyRel reports the job state and retries failed state reads with increasing delays. Pressing
Ctrl-Cin an interactive terminal asks whether to cancel the job. Without an interactive terminal, the job keeps running. If PyRel cannot read the job state, it shows all available logs. Predictive reasoning is in Public Preview. -
Completed Graph Neural Network (GNN) training runs can now be registered from a later Python session without retraining by passing
model_run_idtoGNN.register_model(). The session must use the same profile and GNN definition. If the chosen model version already exists in the Snowflake Model Registry, PyRel confirms the run is still available and suggests another version.
Bug Fixes
Section titled “Bug Fixes”- Fixed an issue that caused
Fragment.to_df()to round large integers returned by Snowflake when the same column contained a missing value.
Deprecations and Removals
Section titled “Deprecations and Removals”-
PyRel 2.4.0 drops support for Python 3.10 and requires Python 3.11 through 3.14. Python 3.10 users must upgrade to Python 3.11–3.14 or remain on PyRel 2.3.1 or earlier. New projects created by
rai models initalso require Python 3.11 or later. -
PyRel 2.4.0 replaces
sqlglot>=28.10,<29withsqlglot>=30.35,<31, so environments pinned to the old range cannot satisfy the new package requirement and must update the pin before installing. -
compiler.dry_runis no longer accepted by model deployment or deployment planning. Those operations now raiseValueErrorbefore connecting when the setting is enabled. Unset the option and userai models deploy --planorModel.plan_deployment()to preview deployment changes.compiler.dry_runstill applies to query compilation. -
Predictive reasoning’s
GNNconstructor no longer acceptstask=and raisesValueErrorwhen it is provided. For non-deployment scoring, use the explicitsource_conceptandtask_typefields, and includetarget_conceptfor link prediction.