Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1d05985
fix(flotilla): wire min_cpu_per_task into TaskResourceRequest
XiaoHongbo-Hope Jun 13, 2026
034ec2b
test: cover min_cpu_per_task wiring; clarify field doc
XiaoHongbo-Hope Jun 13, 2026
a0f07e5
fix(flotilla): keep min_cpu_per_task default at 1.0 (no-regression)
XiaoHongbo-Hope Jun 14, 2026
2b7ce31
test(flotilla): reuse builder's min_cpu_per_task in with_resource_req…
XiaoHongbo-Hope Jun 15, 2026
ab1e67a
fix(flotilla): apply min_cpu_per_task as floor and reject non-positiv…
XiaoHongbo-Hope Jun 17, 2026
48a4d2a
fix(clippy): collapse let-chain in min_cpu_per_task env guard
XiaoHongbo-Hope Jun 17, 2026
ebdf031
Merge branch 'main' into fix/min-cpu-per-task-wiring
XiaoHongbo-Hope Jun 19, 2026
c36c458
fix(plan): leave num_cpus unset so min_cpu_per_task can lower task CPU
XiaoHongbo-Hope Jun 19, 2026
cd6ea1f
docs: align min_cpu_per_task docstring with fallback (not floor) sema…
XiaoHongbo-Hope Jun 20, 2026
710c932
fix(autoscale): use TaskResourceRequest wrappers so min_cpu_per_task …
XiaoHongbo-Hope Jun 20, 2026
f0ee20c
fix(flotilla): send fractional CPU to Ray autoscaler and reject non-f…
XiaoHongbo-Hope Jun 20, 2026
ad2f528
fix(flotilla): aggregate fractional CPU into integer Ray autoscaler b…
XiaoHongbo-Hope Jun 20, 2026
4620acb
fix(flotilla): keep multi-CPU tasks as individual autoscaler bundles
XiaoHongbo-Hope Jun 20, 2026
5303372
fix(flotilla): track post-aggregation request as autoscaler high-wate…
XiaoHongbo-Hope Jun 20, 2026
eb091a3
fix(resource-request): reject non-finite and negative num_cpus/num_gpus
XiaoHongbo-Hope Jun 21, 2026
d6f11a1
fix(flotilla): pack fractional GPU into integer autoscaler bundles
XiaoHongbo-Hope Jun 21, 2026
467f0b7
fix(flotilla): carry GPU tasks' CPU into packed autoscaler bundles
XiaoHongbo-Hope Jun 21, 2026
5f25d91
refactor(daft-config): share min_cpu_per_task validity rule
XiaoHongbo-Hope Jun 21, 2026
953b6be
fix(flotilla): emit unit GPU autoscaler bundles, not oversized shapes
XiaoHongbo-Hope Jun 21, 2026
1483cee
docs(flotilla): tighten autoscaler bundle comments
XiaoHongbo-Hope Jun 21, 2026
27f15c2
fix(flotilla): honor explicit num_cpus=0 in autoscaler bundles
XiaoHongbo-Hope Jun 21, 2026
5f9a8a6
deprecate min_cpu_per_task execution config
XiaoHongbo-Hope Jun 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion daft/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import contextlib
import logging
import threading
import warnings
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, ClassVar

Expand Down Expand Up @@ -285,7 +286,8 @@ def set_execution_config(
pre_shuffle_merge_partition_threshold: Number of partitions threshold to enable pre-shuffle merge when shuffle_algorithm is "auto". Defaults to 200.
scantask_max_parallel: Set the max parallelism for running scan tasks simultaneously. Currently, this only works for Native Runner. If set to 0, all available CPUs will be used. Defaults to 8.
native_parquet_writer: Whether to use the native parquet writer vs the pyarrow parquet writer. Defaults to `True`.
min_cpu_per_task: Minimum CPU per task in the Ray runner. Defaults to 0.5.
min_cpu_per_task: Deprecated. This was used by the old Ray runner and has no effect on
Flotilla scheduling. It will be removed in the next minor version.
actor_udf_ready_timeout: Timeout for UDF actors to be ready. Defaults to 120 seconds.
maintain_order: Whether to maintain order during execution. Defaults to True. Some blocking sink operators (e.g. write_parquet) won't respect this flag and will always keep maintain_order as false, and propagate to child operators. It's useful to set this to False for running df.collect() when no ordering is required.
enable_dynamic_batching: Whether to enable dynamic batching. Defaults to False.
Expand All @@ -295,6 +297,14 @@ def set_execution_config(
enable_multi_glob_path_tasks: Whether to create multiple glob path tasks in Ray Runner to achieve parallel glob. Defaults to False.
"""
# Replace values in the DaftExecutionConfig with user-specified overrides
if min_cpu_per_task is not None:
warnings.warn(
"`min_cpu_per_task` is deprecated and has no effect on Flotilla scheduling. "
"It will be removed in the next minor version.",
DeprecationWarning,
stacklevel=2,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stacklevel=2 only surfaces this warning for direct set_execution_config(...) calls. When users call execution_config_ctx(min_cpu_per_task=...), the warning is attributed to daft/context.py instead of user code, so the default DeprecationWarning filter hides it. The new test catches the warning with pytest.warns, but misses this user-visible behavior. Could we warn from the outer context-manager path or adjust the stacklevel/helper so both public APIs point at the caller?

)

ctx = get_context()
with ctx._lock:
old_daft_execution_config = ctx._ctx._daft_execution_config if config is None else config
Expand Down
4 changes: 4 additions & 0 deletions src/common/daft-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ impl DaftExecutionConfig {
if let Some(val) =
parse_number_from_env(Self::ENV_DAFT_MIN_CPU_PER_TASK, cfg.min_cpu_per_task)
{
eprintln!(
"{} is deprecated and has no effect on Flotilla scheduling. It will be removed in the next minor version.",
Self::ENV_DAFT_MIN_CPU_PER_TASK
);
cfg.min_cpu_per_task = val;
}

Expand Down
6 changes: 6 additions & 0 deletions tests/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,3 +375,9 @@ def test_set_scantask_max_parallelism_greater_than_partition_num():
df = daft.range(start=0, end=1024, partitions=10)
df.explain(show_all=True, file=str_io)
assert "Num Parallel Scan Tasks = 17" in str_io.getvalue().strip()


def test_min_cpu_per_task_is_deprecated():
with pytest.warns(DeprecationWarning, match="min_cpu_per_task"):
with daft.execution_config_ctx(min_cpu_per_task=0.1):
assert daft.context.get_context().daft_execution_config.min_cpu_per_task == 0.1
Loading