Skip to content
These docs are for v1 of RelationalAI. Click here to view the v2 docs.

Python package and CLI 1.0.13

With multiple prescriptive solutions, query the returned ProblemVariable instead of deprecated Problem.variable_values(), and stop calling Problem.load_point() with nonzero indices.

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==1.0.13"

For the latest installation instructions, see Start building with PyRel.

  • Expanded graph APIs:

  • Added cumsum_asc() for cumulative sums over ascending keys.

  • Added global --json and --no-color options to the rai CLI to make output easier to handle in automation. --json returns structured output for reasoners:list, reasoners:get, jobs:list, and jobs:get. For example:

    Terminal window
    rai --json jobs:list
    rai --no-color reasoners:list
  • Updated rai CLI wait flows so they make fewer unnecessary backend status and result checks before returning. These flows occur when you use --wait with commands like rai reasoners:create and rai reasoners:resume:

    Terminal window
    rai reasoners:create --type Logic --name my_reasoner --wait
    rai reasoners:resume --type Logic --name my_reasoner --wait

    The same improvements also apply when PyRel waits on jobs and reasoners.

  • If you work with multiple prescriptive solutions, keep the ProblemVariable returned by problem.solve_for(...) and query it directly instead of calling Problem.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 for load_point(0), but load_point(k) for k > 0 is no longer supported.