MCPcopy Index your code
hub / github.com/dask/dask / optimize

Function optimize

dask/_expr.py:898–920  ·  view source on GitHub ↗

High level query optimization This leverages three optimization passes: 1. Class based simplification using the ``_simplify`` function and methods 2. Blockwise fusion Parameters ---------- expr: Input expression to optimize fuse: whether or not to tur

(expr: Expr, fuse: bool = True)

Source from the content-addressed store, hash-verified

896
897
898def optimize(expr: Expr, fuse: bool = True) -> Expr:
899 """High level query optimization
900
901 This leverages three optimization passes:
902
903 1. Class based simplification using the ``_simplify`` function and methods
904 2. Blockwise fusion
905
906 Parameters
907 ----------
908 expr:
909 Input expression to optimize
910 fuse:
911 whether or not to turn on blockwise fusion
912
913 See Also
914 --------
915 simplify
916 optimize_blockwise_fusion
917 """
918 stage: OptimizerStage = "fused" if fuse else "simplified-physical"
919
920 return optimize_until(expr, stage)
921
922
923def optimize_until(expr: Expr, stage: OptimizerStage) -> Expr:

Callers

nothing calls this directly

Calls 1

optimize_untilFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…