-
Notifications
You must be signed in to change notification settings - Fork 297
chore: Remove the PyRunner #4458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
374277a
7e2a0aa
48b40f5
09c40ca
e9d7854
0f00fde
966b1c5
bc93a26
f2bc89d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
from daft.daft import IOConfig, PyDaftContext, PyDaftExecutionConfig, PyDaftPlanningConfig | ||
from daft.daft import get_context as _get_context | ||
from daft.daft import set_runner_native as _set_runner_native | ||
from daft.daft import set_runner_py as _set_runner_py | ||
from daft.daft import set_runner_ray as _set_runner_ray | ||
|
||
if TYPE_CHECKING: | ||
|
@@ -94,31 +93,6 @@ def set_runner_ray( | |
return DaftContext._from_native(py_ctx) | ||
|
||
|
||
def set_runner_py(use_thread_pool: bool | None = None, num_threads: int | None = None) -> DaftContext: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of removing, would it be better to have it return an error? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be helpful but we also have noted that deprecation warning for a while now so it's ok to remove as well. I'll leave it to your discretion |
||
"""Configure Daft to execute dataframes in the local Python interpreter. | ||
|
||
Args: | ||
use_thread_pool: If True, uses a thread pool for parallel execution. | ||
If False, runs single-threaded. If None, uses system default. | ||
|
||
Returns: | ||
DaftContext: Updated Daft execution context configured for local Python. | ||
|
||
Note: | ||
Can also be configured via environment variable: DAFT_RUNNER=py | ||
|
||
Deprecated: | ||
This execution mode is deprecated. Use set_runner_native() instead for | ||
improved local performance with native multi-threading. | ||
""" | ||
py_ctx = _set_runner_py( | ||
use_thread_pool=use_thread_pool, | ||
num_threads=num_threads, | ||
) | ||
|
||
return DaftContext._from_native(py_ctx) | ||
|
||
|
||
def set_runner_native(num_threads: int | None = None) -> DaftContext: | ||
"""Configure Daft to execute dataframes using native multi-threaded processing. | ||
|
||
|
@@ -204,7 +178,6 @@ def set_execution_config( | |
high_cardinality_aggregation_threshold: float | None = None, | ||
read_sql_partition_size_bytes: int | None = None, | ||
enable_aqe: bool | None = None, | ||
enable_native_executor: bool | None = None, | ||
default_morsel_size: int | None = None, | ||
shuffle_algorithm: str | None = None, | ||
pre_shuffle_merge_threshold: int | None = None, | ||
|
@@ -251,7 +224,6 @@ def set_execution_config( | |
high_cardinality_aggregation_threshold: Threshold selectivity for performing high cardinality aggregations on the Native Runner. Defaults to 0.8. | ||
read_sql_partition_size_bytes: Target size of partition when reading from SQL databases. Defaults to 512MB | ||
enable_aqe: Enables Adaptive Query Execution, Defaults to False | ||
enable_native_executor: Enables the native executor, Defaults to False | ||
default_morsel_size: Default size of morsels used for the new local executor. Defaults to 131072 rows. | ||
shuffle_algorithm: The shuffle algorithm to use. Defaults to "auto", which will let Daft determine the algorithm. Options are "map_reduce" and "pre_shuffle_merge". | ||
pre_shuffle_merge_threshold: Memory threshold in bytes for pre-shuffle merge. Defaults to 1GB | ||
|
@@ -284,7 +256,6 @@ def set_execution_config( | |
high_cardinality_aggregation_threshold=high_cardinality_aggregation_threshold, | ||
read_sql_partition_size_bytes=read_sql_partition_size_bytes, | ||
enable_aqe=enable_aqe, | ||
enable_native_executor=enable_native_executor, | ||
default_morsel_size=default_morsel_size, | ||
shuffle_algorithm=shuffle_algorithm, | ||
flight_shuffle_dirs=flight_shuffle_dirs, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used by pyrunner only