dgl.contrib.graph_store.SharedMemoryDGLGraph.pull¶
-
SharedMemoryDGLGraph.
pull
(v, message_func='default', reduce_func='default', apply_node_func='default', inplace=True)[source]¶ Pull messages from the node(s)’ predecessors and then update their features.
Optionally, apply a function to update the node features after receive.
In the graph store, all updates are written inplace.
reduce_func will be skipped for nodes with no incoming message.
If all
v
have no incoming message, this will downgrade to anapply_nodes()
.If some
v
have no incoming message, their new feature value will be calculated by the column initializer (seeset_n_initializer()
). The feature shapes and dtypes will be inferred.
- Parameters
v (int, iterable of int, or tensor) – The node(s) to be updated.
message_func (callable, optional) – Message function on the edges. The function should be an
Edge UDF
.reduce_func (callable, optional) – Reduce function on the node. The function should be a
Node UDF
.apply_node_func (callable, optional) – Apply function on the nodes. The function should be a
Node UDF
.inplace (bool, optional) – The value is always True.