Skip to content

retail_planning: README fixes for predictive reasoner setup#70

Merged
cafzal merged 7 commits into
mainfrom
retail_planning_v2
May 21, 2026
Merged

retail_planning: README fixes for predictive reasoner setup#70
cafzal merged 7 commits into
mainfrom
retail_planning_v2

Conversation

@pkouki
Copy link
Copy Markdown
Contributor

@pkouki pkouki commented May 15, 2026

Summary

While running retail_planning_local.py end-to-end, several gaps in the quickstart were uncovered. This PR fixes the README (and the related pyproject.toml pin) so a user following the instructions can get through setup without trial and error. It also pulls in a small code fix from @nikolaoszygouras-rai.

Changes

  • Pin relationalai[gnn]==1.4.1 (in both pyproject.toml and the README). The predictive reasoner used by this template was merged in 1.4.1 — older versions fail at import with ModuleNotFoundError: No module named 'relationalai.semantics.reasoners.predictive'. The [gnn] extra pulls in the required GNN dependencies.

  • Add note after rai init telling users to add data.ensure_change_tracking: true to their raiconfig.yaml. Required for the template to work correctly.

  • Add quickstart step 5 with SQL commands to create the experiment database/schema in Snowflake and grant the required permissions to the RAI Native App. Without this, GNN training fails with: "Schema does not exist or the GNN RelationalAI Native App lacks permissions." The note in the step tells users to swap RELATIONALAI for whatever rai_app_name they configured.

  • Remove inapplicable has_time_column=True troubleshooting entry. The limitation it describes no longer applies.

  • Explicit ProdCapacity.opt_article relationship declaration in retail_planning_local.py (small fix from @nikolaoszygouras-rai via Fix: explicit opt_article relationship declaration in retail_planning_local.py #73, merged into this branch).

Test plan

  • Verify quickstart steps 1–6 work end-to-end on a clean checkout
  • Confirm SQL grants in step 5 are sufficient for gnn.fit() to start

🤖 Generated with Claude Code

pkouki and others added 2 commits May 15, 2026 11:48
- Bump minimum relationalai SDK version to 1.3.1 (required for predictive reasoner)
- Replace `rai init` quickstart step with instructions to edit raiconfig.yaml directly,
  since the SDK now prioritizes .yaml over the .toml that rai init produces
- Add quickstart step with SQL commands to create the experiment database/schema
  in Snowflake and grant required permissions to the RAI Native App
- Remove inapplicable has_time_column=True troubleshooting entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The predictive reasoner requires relationalai >= 1.4.1. Updates both the
pyproject.toml dependency and the README prerequisites line.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pkouki and others added 3 commits May 15, 2026 16:28
The predictive reasoner requires GNN dependencies, which are pulled in via
the [gnn] extra.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- pyproject.toml and README now pin relationalai[gnn]==1.4.1 (exact)
- Quickstart step 4 reverted to `rai init`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

The docs preview for this pull request has been deployed to Vercel!

✅ Preview: https://relationalai-docs-izzu8z56j-relationalai.vercel.app/build/templates
🔍 Inspect: https://vercel.com/relationalai/relationalai-docs/CKnPBv31QNcWKWFaNGMUFvDJg5BZ

…-opt-article-relationship

Fix: explicit opt_article relationship declaration in retail_planning_local.py
@pkouki pkouki requested a review from cafzal May 21, 2026 10:44
Tell users to add `data.ensure_change_tracking: true` to raiconfig.yaml
after rai init generates it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@somacdivad somacdivad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @pkouki. Thanks!

@cafzal cafzal merged commit fb80c83 into main May 21, 2026
3 checks passed
@cafzal cafzal deleted the retail_planning_v2 branch May 21, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants