MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / tutorial_cluster

Function tutorial_cluster

python/tutorial/T02-Cluster.py:15–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14
15def tutorial_cluster():
16 b1, b2, b3 = MyNode1("nodeB1"), MyNode1("nodeB2", 3), MyNode2("nodeB3")
17 b_cluster = GCluster([b1, b2, b3]) # input is list[], means insert group(this is cluster), not for depend
18
19 pipeline = GPipeline()
20 a, c, d = MyNode1(), MyNode2(), MyNode1()
21
22 pipeline.registerGElement(a, set(), "nodeA")
23 pipeline.registerGElement(b_cluster, {a}, "clusterB", 2)
24 pipeline.registerGElement(c, {a}, "nodeC")
25 pipeline.registerGElement(d, {b_cluster, c}, "nodeD", 2)
26
27 pipeline.process()
28
29
30if __name__ == '__main__':

Callers 1

T02-Cluster.pyFile · 0.70

Calls 4

processMethod · 0.95
MyNode1Class · 0.90
MyNode2Class · 0.90
GPipelineClass · 0.85

Tested by

no test coverage detected