MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / source_def

Function source_def

flow-python/megflow/func_op.py:96–101  ·  view source on GitHub ↗
(self, func)

Source from the content-addressed store, hash-verified

94
95@_common_def(outputs=["out"])
96def source_def(self, func):
97 from megflow import Envelope
98 i = 0
99 for msg in func():
100 self.out.send(Envelope.pack(msg, info={'partial_id':i}))
101 i += 1
102
103
104@_common_def(inputs=["inp"], outputs=["out"])

Callers

nothing calls this directly

Calls 2

packMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected