alibaba / euler

A distributed graph deep learning framework.
Apache License 2.0
2.89k stars 559 forks source link

是否可以在随机采样时只采样与源节点的某个属性值相同的目标节点 #318

Open imLogM opened 3 years ago

imLogM commented 3 years ago

问题的背景是希望采样与 源节点的某个属性值相同 的 目标节点。 比如 源节点feature1='a',则希望采样到的节点也是 feature1='a'。

如果使用: tf_euler.sample_node( count, node_type, condition='' ) 但似乎condition的内容是不可变的,不能一会儿 condition='feature1 eq a',一会儿 condition='feature1 eq b'。

如果使用: tf_euler.sample_node_with_src( src_nodes, count ) 则需要将 feature1 作为 node_type,在同时要使用 node_type 时又会冲突。