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

Add a universal function to replace subgraph in OptimizationRule #3353

Open ericpai opened 1 year ago

ericpai commented 1 year ago

This PR adds a univeral function replace_subgraph to OptimizationRule for later use. The unit test cases are added as well.

Fixes #3352

Check code requirements