Fix fresh-install failures in predictive/GNN templates by pinning to a version with the gnn extra - #100
Merged
Merged
Conversation
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.
|
The templates docs preview for this pull request has been deployed to Vercel!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Source and scope
A user hit
ModuleNotFoundError: No module named 'relationalai_gnns'while doing a fresh install of thesmoker_status_predictiontemplate and flagged that the predictive/GNN templates are pinned torelationalaiversions that predate thegnndependency bundle.relationalaiversionsThe
relationalai[gnn]extra (which pulls inrelationalai-gnns) was introduced inrelationalai 1.16.0. Every predictive template was still pinned below that (1.8,1.11.0, or1.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.14snapshot folders, flatteningv1into the repo root, and merging thev1template index into the root README) are intentionally left for follow-up work.What changed
Pinned all nine predictive/GNN
v1templates torelationalai[gnn]==1.27.1— the latest release that provides thegnnextra — keeping the repo's exact-==-pin convention.dependencies): updated inretail_planning,memory_supply_allocation,energy_grid_planning,subscriber_retention,telco_network_recovery,datacenter_compute_allocation,fraud-detection,smoker_status_prediction,demand_forecasting.Why
Before: the templates declared
relationalai[gnn]==1.8|1.11.0|1.15.0. Those versions have nognnextra, so a freshpip installof the template silently omitsrelationalai-gnnsand the run dies withModuleNotFoundError: No module named 'relationalai_gnns'.After: the templates declare a version that actually ships the
gnnextra, so a clean install pulls in the GNN runtime and the predictive step can run.Risks
1.27.1is 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):pip install .from the template directory.relationalai-gnnsis installed (pip show relationalai-gnns).*.pyentrypoint and confirm it no longer fails withModuleNotFoundError: No module named 'relationalai_gnns'.grep -rn "relationalai\[gnn\]" v1should show only1.27.1.