mars-project / mars

Mars is a tensor-based unified framework for large-scale data computation which scales numpy, pandas, scikit-learn and Python functions.
https://mars-project.readthedocs.io
Apache License 2.0
2.68k stars 325 forks source link

A more universal function to replace subgraph in OptimizationRule #3352

Open ericpai opened 1 year ago

ericpai commented 1 year ago

Currently in OptimizationRule, there're only collapsable_predecessors adding/removing and node replacing functions to handle graph mutation. However, some new rules may need to replace a piece of subgraph by adding/removing nodes and edges. Thus we need a more universal function to do this work.