polars 1.35.2 (RAPIDS 26.02 image) rust-panics on grouped min/max over Categorical — a pyo3 PanicException no GFQL wrapper can catch
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start with the categorical aggregation workaround and its test at graphistry/tests/compute/gfql/test_aggregate_type_contract.py::test_categorical_is_decategorized_before_aggregating_on_polars; then survey other Polars expressions emitted by the repository that could send categorical values into kernels. Also compare the Polars versions in the RAPIDS image and local development. Done means the survey and version-drift decision are documented, with any identified risk covered by tests.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Surfaced by the GPU lane of #1819 on the dgx GB10
(graphistry/test-rapids-official:26.02-gfql-polars, polars 1.35.2). Worked around there, but
the underlying hazard is general and worth its own record.
What happens
A grouped min()/max() over a Categorical column makes polars 1.35.2 panic in its Rust core:
thread 'polars-2' panicked at crates/polars-core/src/series/implementations/categorical.rs:350:1:
not implemented
...
E pyo3_runtime.PanicException: not implemented
polars/lazyframe/frame.py:2422: pyo3_runtime.PanicException
Local polars 1.42 handles the same expression fine, so this is invisible outside the RAPIDS
image — 10 test failures on the GPU box, 0 locally, on identical code.
Why it is a hazard beyond one polars version
pyo3_runtime.PanicException is not a polars.exceptions.PolarsError. #1819 added a choke point
in the native polars chain that rewraps polars errors as GFQLTypeError(E303) so a third-party class
never reaches the caller — and that wrapper cannot catch this. A Rust panic escaping through the
GFQL surface is uncatchable by construction on the python side, so the only defence is not to emit
the expression that panics.
Workaround already in place (#1819)
Categorical/Enum columns are cast to String before any aggregate on both engines — which is
independently correct (Cypher treats a categorical as a string column, and it also fixed pandas
raising and cuDF answering count(DISTINCT <categorical>) with a category label). Pinned by a test
that asserts the result dtype is String, because the failure it prevents is version-dependent
and a value assertion on polars 1.42 cannot see it:
graphistry/tests/compute/gfql/test_aggregate_type_contract.py::test_categorical_is_decategorized_before_aggregating_on_polars
What is left to decide
- Whether other polars expressions this repo emits can panic the same way on the pinned image
version — a survey, not a guess. Anything Categorical-typed reaching a polars kernel is suspect. - Whether the polars version drift between the RAPIDS image (1.35.2) and local dev (1.42) should be
closed or at least asserted, since it silently changes which defects are observable. Related
standing note: validate in-container before measuring anything polars-version-sensitive.
- Lingua principale
- Python
- Stelle
- 2.6k
- Fork
- 229
- Merge medio
- 1g 5h
- PR unite (30g)
- 99
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di graphistry/pygraphistry
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
graphistry/pygraphistry#2171 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
graphistry/pygraphistry#1965 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
graphistry/pygraphistry#1208 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
graphistry/pygraphistry#966 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
graphistry/pygraphistry#824 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di graphistry/pygraphistry
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
earthtojake/text-to-cad#758 ·
I maintainer di solito rispondono entro 1 giorno
-
domain:upgrades enhancement needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
gke-labs/kube-agents#4634 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
agardnerIT/opamp-server-py#116 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
elviskahoro/sdk-python-attio#144 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno