What's New in Version 0.6.0
New Features and Enhancements
Section titled “New Features and Enhancements”-
Snowflake Notebooks on Container Runtime are now supported! Container Notebooks offer a more flexible environment than Warehouse Notebooks:
-
You can install the
relationalai
package usingpip install relationalai
instead of uploading the package as a ZIP file. This requires enabling an external access integration for PyPI, and lets you install other third-party packages, as well. ZIP file uploads are still supported if you do not want to enable external access to PyPI. -
You do not need to enable external access integration for downloading query results to the notebook, like you do for Warehouse Notebooks.
-
-
Data streams are now automatically created for you on Snowflake tables and views passed to the
source
parameter of themodel.Type()
constructor. Existing data streams will be recreated the first time you query a model using0.6.0
. See Migrating Models to0.6.0
for more information. -
You can set the new
ensure_change_tracking
configuration key to automatically enable change tracking on tables or views passed to themodel.Type()
constructor’ssource
parameter. The default value isFalse
, which means that table and view owners must manually enable change tracking on their objects. -
Engines auto-created by the Python API are configured by default to suspend after 60 minutes of inactivity. You can override this default by specifying the
auto_suspend_mins
configuration key in yourraiconfig.toml
file. Suspended engines are automatically resumed when Python queries are executed. See Engine Suspension for more information on suspended engines. -
A convenience function
save_config()
has been added for creating araiconfig.toml
file from a notebook environment. -
The
Graph.visualize()
function now throws anUnsupportedVisualizationError
if called in an environment, like a Snowflake notebook, that does not support visualization.
Bug Fixes
Section titled “Bug Fixes”-
Fixes a bug that caused an
UninitializedPropertyException
to be thrown when a type that has never been added to is queried. -
Fixes a bug that displayed the message
Failed to connect to ws://0.0.0.0:8080/ws/program. Running with debug sink disabled.
when the RAI debugger is not running.
Breaking Changes
Section titled “Breaking Changes”-
Several methods of the
graphs.Compute
class have been changed or removed:-
.is_triangle()
no longer returns anExpression
object that producesTrue
orFalse
values. Instead, it filters arguments for combinations of three nodes that form a triangle. This behavior is consistent with how other functions, like.is_reachable()
, work. -
.louvain()
now throws aDirectedGraphNotApplicable
error if called from a directed graph. -
The default values for the
max_levels
andmax_sweeps
parameters of the.louvain()
and.infomap()
methods have been changed:max_levels
has changed from4
to1
.max_sweeps
has changed from8
to20
.
-
You may now call the following methods from a weighted graph:
Previously, these returned empty results for weighted graphs. Because they now support weighted graphs, the following methods have been removed:
.weighted_cosine_similarity()
.weighted_degree_centrality()
.weighted_distance()
.weighted_jaccard_similarity()
-
Methods for computing degree statistics have been removed:
.avg_degree()
.avg_indegree()
.avg_outdegree()
.max_degree()
.max_indegree()
.max_outdegree()
.min_degree()
.min_indegree()
.min_outdegree()
You can compute these statistics using the
.degree()
method and an aggregation function:from relationalai.std import aggregatesdef avg_degree(graph):node = graph.Node()degree = graph.compute.degree(node)return aggregates.avg(degree)
-
-
Internal node hashes for graphs are now stable. Algorithms sensitive to node order will now produce consistent results across different runs.
-
All output fields for the
rai imports:setup
CLI command are now displayed insnake_case
. Previously, some were displayed incamelCase
while others were displayed insnake_case
. -
The
--pool
parameter for therai engines:create
CLI command has been removed. Engine compute pools are fully managed by the RAI Native App.
Migrating Models to 0.6.0
Section titled “Migrating Models to 0.6.0”The first time you query an existing model after upgrading to 0.6.0
, data streams used by the model will be recreated.
New data streams appear in the api.data_streams
view with a RAI_DATABASE
column containing the name pyrel_root_db
.
Once the new data streams are created, you can safely delete the old data streams using the api.delete_data_stream()
procedure by passing your model’s name and the fully-qualified name of the table or view associated with the old data stream.
CALL relationalai.api.delete_data_stream('my_model', '<db>.<schema>.<table_or_view>');