What's New in Version 0.7.0
New Features and Enhancements
Section titled “New Features and Enhancements”-
You may now resume suspended engines from the RAI CLI using the new
rai engines:resume
command. For example, the following resumes an engine namedmy_engine
:Terminal window rai engines:resume --name my_engine -
You may now specify the
--auto_suspend_mins
option when creating an engine with therai engines:create
CLI command. For example, the following creates an engine namedmy_engine
that auto-suspends after 30 minutes of inactivity:Terminal window rai engines:create --name my_engine --size HIGHMEM_X64_S --auto_suspend_mins 30Note that the
--auto_suspend_mins
parameter is optional and defaults to60
minutes. If yourraiconfig.toml
file contains anauto_suspend_mins
key, the value of that key will be used as the default. -
Error reporting for queries with the
format="snowpark"
option has been improved. All errors are now reported. Previously, some errors were suppressed. -
Error messages for multi-factor authentication issues have been improved to provide more context, such as when a connection fails due to Duo security settings.
-
A new
experimental
module has been added that contains experimental features:-
The
experimental.inspect.watch()
function may be used to do “print debugging” of expressions in a rule or query. For example:import relationalai as raifrom relationalai.std import aggregatesfrom relationalai.experimental.inspect import watchmodel = rai.Model("MyModel")Person = model.Type("Person")Adult = model.Type("Adult")with model.rule():Person.add(id=1).set(name="Jane", age=12)Person.add(id=2).set(name="John", age=21)with model.rule():person = Person()person.age >= 18# Print "is adult" with the person's name and age# when the rule is evaluated.watch("is adult", person, person.name, person.age)person.set(Adult)with model.query() as select:adult = Adult()num_adults = aggregates.count(adult)response = select(num_adults)print(response.results)The above program produces the following output:
v1 v2 v3 v40 is adult g4rDjPY1HHWkEikWQXw+3Q John 21result0 1Note that a query that triggers the rule containing the
watch()
function must be executed in order to see the output. -
The
experimental.paths
module contains functions and classes for finding and working with paths in a graph. If you would like to try out this feature, please contact support at support@relational.ai.
Documentation for features in
experimental
is coming soon. -
Breaking Changes
Section titled “Breaking Changes”- The implementation of Model.export() has changed to allow it to be used inside of a function call.
Previously, it could only be used as a top-level statement.
This is a breaking change because the new implementation does not allow functions decorated with
@export()
to contain multiplereturn
statements.
Bug Fixes
Section titled “Bug Fixes”-
Fixed a bug that prevented you from using names of aggregation functions, like
count
,min
, ormax
, as property names for entities in a model. -
Fixed a bug that caused an engine’s
auto_suspend_mins
setting to be reset to60
minutes after being auto-resumed. -
Fixed a bug that made it impossible to export a SQL stored procedure if the query produced a column with only
NULL
values. -
Fixed several bugs in the RAI debugger:
-
Fixed a bug that occasionally caused
ConnectionResetError: Cannot write to closing transport
errors. -
Fixed a bug that caused the wrong Python code to be displayed when viewing a model’s rules.
-
Fixed a bug that prevented profiling stats from updating while a query is executing.
-