Skip to content

Commit c6a034d

Browse files
lmeyerovclaude
andcommitted
docs(gfql): document Python-settable polars streaming/executor config
The engine guide said the streaming flags are 'read at import time' — no longer true: they're read live and settable from Python (set_cpu_streaming / set_gpu_executor + the public GPU_EXECUTORS options, added on the polars-engine PR). Document the Python API alongside the existing env vars. doc-test:skip (the API lands with the polars PR this docs PR stacks on). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8cb04d7 commit c6a034d

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

docs/source/gfql/engines.rst

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,7 @@ page measures, the default is faster and more stable. Results are
405405
**parity-identical** to the default — streaming changes *how* the plan runs, not
406406
*what* it returns.
407407

408-
The flags are read at import time, so set them **before your process starts** (or
409-
before ``import graphistry``):
408+
Set them by environment variable:
410409

411410
.. code-block:: bash
412411
@@ -416,6 +415,20 @@ before ``import graphistry``):
416415
# GPU: streaming executor for larger-than-device-memory results
417416
export GFQL_POLARS_GPU_EXECUTOR=streaming
418417
418+
...or from Python at runtime — the setting is read **live** (per collect), and a Python
419+
override takes precedence over the environment variable:
420+
421+
.. doc-test: skip
422+
423+
.. code-block:: python
424+
425+
from graphistry.compute.gfql.lazy import (
426+
set_cpu_streaming, set_gpu_executor, GPU_EXECUTORS,
427+
)
428+
429+
set_cpu_streaming(True) # CPU streaming collect (pass None to reset to env/default)
430+
set_gpu_executor('streaming') # one of GPU_EXECUTORS == ('in-memory', 'streaming')
431+
419432
Then use ``engine='polars'`` / ``engine='polars-gpu'`` exactly as before — no code
420433
change:
421434

0 commit comments

Comments
 (0)