1.0.13
Python SDK
Version 1.0.13 of the relationalai Python package is now available!
To upgrade, activate your virtual environment and run the following command:
pip install --upgrade relationalai
New Features and Enhancements
Expanded graph APIs:
Graph.adamic_adar()now supports weighted and directed graphs.Graph.is_acyclic()adds a built-in DAG check for directed graphs.
Added
cumsum_asc()for cumulative sums over ascending keys.Added global
--jsonand--no-coloroptions to theraiCLI to make output easier to handle in automation.--jsonreturns structured output forreasoners:list,reasoners:get,jobs:list, andjobs:get. For example:rai --json jobs:list rai --no-color reasoners:listUpdated
raiCLI wait flows so they make fewer unnecessary backend status and result checks before returning. These flows occur when you use--waitwith commands likerai reasoners:createandrai reasoners:resume:rai reasoners:create --type Logic --name my_reasoner --wait rai reasoners:resume --type Logic --name my_reasoner --waitThe same improvements also apply when PyRel waits on jobs and reasoners.
Upgrade Notes
If you work with multiple prescriptive solutions, keep the
ProblemVariablereturned byproblem.solve_for(...)and query it directly instead of callingProblem.variable_values(). For example:var = problem.solve_for(...) sol_idx = Integer.ref() value = Float.ref() model.select(sol_idx, value).where(var.values(sol_idx, value))This returns
(sol_idx, value)pairs, so you can inspect every solution or filter to one specific solution index.Problem.variable_values()still works, but it is deprecated and no longer preferred.Problem.load_point()still works as a deprecated no-op forload_point(0), butload_point(k)fork > 0is no longer supported.