Skip to content

Commit

Permalink
[CHORE] Add warning in PyRunner to switch to Native (#3472)
Browse files Browse the repository at this point in the history
Warn users that pyrunner is going to be deprecated and they should
switch to native.

---------

Co-authored-by: Colin Ho <[email protected]>
  • Loading branch information
colin-ho and Colin Ho authored Dec 2, 2024
1 parent 203dc76 commit 465510f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions daft/runners/pyrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import multiprocessing as mp
import threading
import uuid
import warnings
from concurrent import futures
from dataclasses import dataclass
from typing import TYPE_CHECKING, Callable, Iterator
Expand Down Expand Up @@ -340,6 +341,11 @@ def run_iter(
builder: LogicalPlanBuilder,
results_buffer_size: int | None = None,
) -> Iterator[LocalMaterializedResult]:
warnings.warn(
"PyRunner will be deprecated in v0.4.0 and the new NativeRunner will become the default for local execution."
"We recommend switching to the NativeRunner now via `daft.context.set_runner_native()` or by setting the env variable `DAFT_RUNNER=native`. "
"Please report any issues at github.com/Eventual-Inc/Daft/issues",
)
# NOTE: Freeze and use this same execution config for the entire execution
daft_execution_config = get_context().daft_execution_config
execution_id = str(uuid.uuid4())
Expand Down

0 comments on commit 465510f

Please sign in to comment.