Skip to content

Commit 9cec018

Browse files
authored
Perform explicit culling step only if LLG is submitted (#9040)
1 parent 6691e27 commit 9cec018

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

distributed/scheduler.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454

5555
import dask
5656
import dask.utils
57+
from dask._expr import LLGExpr
5758
from dask._task_spec import DependenciesMapping, GraphNode, convert_legacy_graph
5859
from dask.core import istask, validate_key
5960
from dask.typing import Key, no_default
@@ -4877,9 +4878,12 @@ async def update_graph(
48774878

48784879
materialization_done = time()
48794880
logger.debug("Materialization done. Got %i tasks.", len(dsk))
4881+
# Most/all other expression types are implementing their own
4882+
# culling. For LLGExpr we just don't know
4883+
explicit_culling = isinstance(expr, LLGExpr)
48804884
del expr
4881-
4882-
dsk = _cull(dsk, keys)
4885+
if explicit_culling:
4886+
dsk = _cull(dsk, keys)
48834887

48844888
if not internal_priority:
48854889
internal_priority = await offload(dask.order.order, dsk=dsk)

0 commit comments

Comments
 (0)