MCPcopy Create free account
hub / github.com/alibaba/GraphScope / eval

Method eval

python/graphscope/framework/operation.py:138–154  ·  view source on GitHub ↗

Evaluate by :code:`sess.run`. Args: leaf (bool, optional): Leaf Operation means there is no successor.

(self, leaf=True)

Source from the content-addressed store, hash-verified

136 return self._leaf
137
138 def eval(self, leaf=True):
139 """Evaluate by :code:`sess.run`.
140
141 Args:
142 leaf (bool, optional): Leaf Operation means there is no successor.
143 """
144 # NB: to void cycle import
145 # pylint: disable=import-outside-toplevel, cyclic-import
146 from graphscope.client.session import get_session_by_id
147
148 self._leaf = leaf
149 sess = get_session_by_id(self._session_id)
150 if not self._leaf:
151 sess.dag.add_op(self)
152 res = sess.run(self)
153 self._evaluated = True
154 return res
155
156 def add_parent(self, op):
157 self._parents.append(op)

Callers 15

__getitem__Method · 0.45
__del__Method · 0.45
__contains__Method · 0.45
number_of_nodesMethod · 0.45
set_edge_dataMethod · 0.45
set_node_dataMethod · 0.45
sizeMethod · 0.45
number_of_selfloopsMethod · 0.45
get_edge_dataMethod · 0.45
clearMethod · 0.45
clear_edgesMethod · 0.45

Calls 3

get_session_by_idFunction · 0.90
add_opMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected