Repository navigation
Conversation
Six layouts crashed on polars frames (ring layouts called reset_index before resolving the engine, mercator routed polars to the cupy branch, group_in_a_box could not infer an engine) and three silently returned pandas. Even engine='pandas' did not help. All nine layout entry points now use bridge_polars_graph(Engine.PANDAS): Polars-bound graphs (eager or lazy) run on pandas and return eager Polars frames; explicit engine='pandas'/'cudf' returns that engine; fa2_layout keeps requiring a GPU engine or allow_cpu_fallback, as for pandas input. Tests compare each layout's Polars result with the pandas-bound result (rows, values for deterministic layouts, edges, bindings, id dtypes) on eager and lazy input, plus explicit engine='pandas' and engine='polars'. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DBp5x7mfdDARNTXhRoJATw
lmeyerov
force-pushed
the
fix/polars-layouts-1966
branch
from
October 10, 2026 05:51
9f7bbbb to
54ad891
Compare
This branch has not been deployed
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.
Closes #1966. Stacked on #2172, which adds
bridge_polars_graph. Retarget to master after #2172 merges.Problem
Freshly reproduced at master
599c405aon eager and lazy Polars:AttributeError: reset_indexfor everyenginevalue, includingengine='pandas'.AttributeError.Change
All nine layout entry points are wrapped with
bridge_polars_graph(Engine.PANDAS). Polars-bound graphs, eager or lazy, run on pandas and return eager Polars frames with their identifier dtypes. An explicitengine='pandas'or'cudf'returns that engine's frames.fa2_layoutstill needs a GPU engine orallow_cpu_fallback=True, exactly as for pandas input. This intentionally changes circle, tree and modularity from returning pandas to returning Polars; the CHANGELOG and engines.rst document it.Validation (dgx-spark, polars 1.35.2, igraph 1.0.0)
test_polars_layouts.py: 35 pass. Each layout's Polars result matches the pandas-bound result on rows, deterministic values, edges, bindings and id dtypes, for eager and lazy input. The tests also cover explicitengine='pandas'andengine='polars', and that fa2 without a GPU engine declines just as it does on pandas.Out of scope and unchanged:
rotate()andlabel_components()on Polars, andengine='polars'on pandas-bound graphs, which layouts still decline.Merge note: this needs an admin merge (no self-approval possible), which means no human review.
🤖 Generated with Claude Code