Skip to content

Commit ca2b45e

Browse files
lmeyerovclaude
andcommitted
fix(gfql): gate DAG NIE pass-through to polars; skip polars conformance without polars
Two CI failures on this layer, both diagnosed from the failing 3.8/3.14 jobs: (A, real regression) execute_call() added an unconditional 'if isinstance(error, NotImplementedError): raise error' to propagate the polars no-silent-bridge decline on the DAG surface — but it ALSO intercepted a pandas/cudf NIE like fa2_layout's 'requires a GPU', so it stopped falling through to the GFQLTypeError(E303) wrapper and test_fa2_layout_cpu_requires_gpu failed. Gate the pass-through to engine in (POLARS, POLARS_GPU); pandas/cudf NIEs wrap to E303 as before. Verified: fa2 test passes, full test_call_operations green (24/2). (B, py3.14 env) test_engine_polars_conformance_matrix hardcodes the polars lane without probing importability; on Python 3.14 (no cp314 polars wheel) polars is absent from the lockfile, so every case reported a non-NIE ImportError as a conformance failure (~60). Add module-level pytest.importorskip('polars') so the matrix skips cleanly when polars is unavailable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1609331 commit ca2b45e

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

graphistry/compute/gfql/call/executor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,11 @@ def execute_call(g: Plottable, function: str, params: Dict[str, Any], engine: En
253253
) from error
254254
if isinstance(error, GFQLTypeError):
255255
raise error
256-
if isinstance(error, NotImplementedError):
256+
if isinstance(error, NotImplementedError) and engine in (Engine.POLARS, Engine.POLARS_GPU):
257257
# Honest engine-capability decline (e.g. the polars no-silent-bridge guard above) —
258258
# propagate as-is so the DAG surface matches the chain surface's NotImplementedError.
259+
# Gated to the polars engines: a pandas/cudf NIE (e.g. fa2_layout requiring a GPU) must
260+
# still fall through to the GFQLTypeError(E303) wrapper below, not leak as a bare NIE.
259261
raise error
260262
if error is not None:
261263
raise GFQLTypeError(

graphistry/tests/compute/gfql/test_engine_polars_conformance_matrix.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
import graphistry
1616
from graphistry.compute.ast import n, e_forward, e_reverse, e_undirected, call, let, rows, with_, return_
1717

18+
# The whole matrix is the CPU polars lane (plus a GPU lane when present) — it requires polars.
19+
# On interpreters without a polars wheel (e.g. Python 3.14, which has no cp314 wheel yet), skip
20+
# the module cleanly rather than reporting every case as a non-NIE ImportError "conformance" fail.
21+
pytest.importorskip("polars")
22+
1823

1924
# ---- graph with diverse dtypes (int, float w/ null, str, bool) ----
2025
def _graph(seed=0):

0 commit comments

Comments
 (0)