pola-rs/polars · error · NotImplementedError
query monitoring is not supported by the GPU engine
Error message
query monitoring is not supported by the GPU engine
What it means
GPUEngine constructor guard: monitoring=True was requested, but the GPU engine has no query-monitoring facility, so __init__ raises immediately. Any truthy `monitoring` argument triggers it; it is a capability check, not a runtime failure.
Source
Thrown at py-polars/src/polars/lazyframe/engine.py:917
back to the CPU engine.
"""
config: Mapping[str, Any]
"""Additional configuration options for the engine."""
def __init__(
self,
*,
device: int | None = None,
memory_resource: Any | None = None,
raise_on_fail: bool = False,
monitoring: bool = False,
**kwargs: Any,
) -> None:
# We do want a named param for `monitoring`, because otherwise it will silently
# end up in `kwargs`
if monitoring:
msg = "query monitoring is not supported by the GPU engine"
raise NotImplementedError(msg)
super().__init__(monitoring=False)
self.device = device
self.memory_resource = memory_resource
# Avoids need for changes in cudf-polars
kwargs["raise_on_fail"] = raise_on_fail
self.config = kwargs
def _post_opt_callback(
self, *, background: bool, eager: bool
) -> Callable[[Any, int | None], None] | None:
if background:
issue_warning(
"GPU engine does not support background collection, disabling GPU engine.",
category=UserWarning,
)
return None
if eager:View on GitHub (pinned to 68506541d2)
Solutions
- Run the query on the CPU engine if you need query monitoring; the GPU engine does not support it.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at py-polars/src/polars/lazyframe/engine.py:937 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pola-rs/polars@68506541d2 (2026-08-19).
Data as JSON: /api/errors/295fb9f930223c4d.
Report an issue: GitHub.