Skip to content

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:

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

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

  • Model deployment can now place managed Snowflake views in public_schema (the model-output schema) or internal_schema (where PyRel stores deployment metadata and internal objects). Set deployment.placement in DeploymentConfig to choose the default, or override it per view. Placement in internal_schema is 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_schema or internal_schema) with ObjectNameRequest.placement. The ObjectNameRequest.scope property identifies whether an object is public or internal. placement identifies the schema where PyRel creates it. If a naming function omits placement, PyRel uses the schema it would normally assign based on scope, 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-C in 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_id to GNN.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.

  • Fixed an issue that caused Fragment.to_df() to round large integers returned by Snowflake when the same column contained a missing value.
  • 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 init also require Python 3.11 or later.

  • PyRel 2.4.0 replaces sqlglot>=28.10,<29 with sqlglot>=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_run is no longer accepted by model deployment or deployment planning. Those operations now raise ValueError before connecting when the setting is enabled. Unset the option and use rai models deploy --plan or Model.plan_deployment() to preview deployment changes. compiler.dry_run still applies to query compilation.

  • Predictive reasoning’s GNN constructor no longer accepts task= and raises ValueError when it is provided. For non-deployment scoring, use the explicit source_concept and task_type fields, and include target_concept for link prediction.