Skip to content

Fix fresh-install failures in predictive/GNN templates by pinning to a version with the gnn extra - #100

Merged
somacdivad merged 2 commits into
mainfrom
fix-gnn-template-version-pins
Aug 19, 2026
Merged

Fix fresh-install failures in predictive/GNN templates by pinning to a version with the gnn extra#100
somacdivad merged 2 commits into
mainfrom
fix-gnn-template-version-pins

Conversation

@somacdivad

Copy link
Copy Markdown
Collaborator

Source and scope

A user hit ModuleNotFoundError: No module named 'relationalai_gnns' while doing a fresh install of the smoker_status_prediction template and flagged that the predictive/GNN templates are pinned to relationalai versions that predate the gnn dependency bundle.

The relationalai[gnn] extra (which pulls in relationalai-gnns) was introduced in relationalai 1.16.0. Every predictive template was still pinned below that (1.8, 1.11.0, or 1.15.0), so a clean install never installs the GNN runtime and fails at the first GNN import.

This PR partially addresses the thread — it fixes the version-pin bug only. The other topics raised in the thread (removing the historical v0.13/v0.14 snapshot folders, flattening v1 into the repo root, and merging the v1 template index into the root README) are intentionally left for follow-up work.

What changed

Pinned all nine predictive/GNN v1 templates to relationalai[gnn]==1.27.1 — the latest release that provides the gnn extra — keeping the repo's exact-==-pin convention.

  • pyproject.toml (dependencies): updated in retail_planning, memory_supply_allocation, energy_grid_planning, subscriber_retention, telco_network_recovery, datacenter_compute_allocation, fraud-detection, smoker_status_prediction, demand_forecasting.
  • README.md prerequisite/reproducibility lines: updated to match the new pin in the same templates (where a version was stated).

Why

Before: the templates declared relationalai[gnn]==1.8|1.11.0|1.15.0. Those versions have no gnn extra, so a fresh pip install of the template silently omits relationalai-gnns and the run dies with ModuleNotFoundError: No module named 'relationalai_gnns'.

After: the templates declare a version that actually ships the gnn extra, so a clean install pulls in the GNN runtime and the predictive step can run.

Risks

  • The templates were originally authored against older SDKs (1.8–1.15). Moving to 1.27.1 is a significant jump; if any predictive template relies on GNN/predictive API behavior that changed between those releases, that template's script may need follow-up adjustment. The template scripts were not executed end-to-end as part of this change.

How to verify

For any predictive template (e.g. v1/smoker_status_prediction):

  1. Create a clean virtualenv and pip install . from the template directory.
  2. Confirm relationalai-gnns is installed (pip show relationalai-gnns).
  3. Run the template's *.py entrypoint and confirm it no longer fails with ModuleNotFoundError: No module named 'relationalai_gnns'.
  4. Spot-check that no predictive template still references a pre-1.16 pin: grep -rn "relationalai\[gnn\]" v1 should show only 1.27.1.

The gnn extra was introduced in relationalai 1.16.0, but nine predictive
templates were still pinned to pre-1.16 versions (1.8, 1.11.0, 1.15.0).
Fresh installs failed at GNN import with:
  ModuleNotFoundError: No module named 'relationalai_gnns'

Pin all predictive templates to the latest compatible release (1.27.1,
which provides the gnn extra) in pyproject.toml and README prerequisites.
@github-actions

Copy link
Copy Markdown

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

✅ Preview: https://relationalai-docs-qv0ug9p39-relationalai.vercel.app/build/templates
🔍 Inspect: https://vercel.com/relationalai/relationalai-docs/3y9E789EEEkXBXkqnLooUUL3E2Wt

@somacdivad
somacdivad merged commit e0d9265 into main Aug 19, 2026
3 checks passed
@somacdivad
somacdivad deleted the fix-gnn-template-version-pins branch August 19, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant