Skip to content

_reset() reverts unrelated executor_options fields to their default #23742

Description

@Matt711

Part of #23740.

Describe the bug
pl.GPUEngine.__init__ does self.config = kwargs, a wholesale replacement. _reset()
only carries kvikio_nthreads and quent_context forward (and gets quent_context
wrong), every other field is lost on any _reset() call that doesn't happen to
re-specify it.

Steps/Code to reproduce bug

from cudf_polars.engine.spmd import SPMDEngine
from cudf_polars.utils.config import ConfigOptions

with SPMDEngine(executor_options={"max_rows_per_partition": 500}) as engine:
    engine._reset(executor_options={"fallback_mode": "raise"})  # unrelated
    cfg = ConfigOptions.from_polars_engine(engine)
    print(cfg.executor.max_rows_per_partition)

Expected behavior
500, unchanged. Actual: 1_000_000, the hardcoded default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions