FeatureFetcher

class dgl.graphbolt.FeatureFetcher(datapipe, feature_store, node_feature_keys=None, edge_feature_keys=None)[source]

Bases: MiniBatchTransformer

用于在graphbolt中获取节点/边的特征的特征提取器。

功能名称: fetch_feature.

Parameters:
  • datapipe (DataPipe) – The datapipe.

  • feature_store (FeatureStore) – 一个用于存储特征的存储库,支持读取和更新。

  • node_feature_keys (List[str] or Dict[str, List[str]]) – 节点特征键表示需要读取的节点特征。 - 如果 node_features 是一个列表:表示图是同质图,列表中的 'str' 是特征名称。 - 如果 node_features 是一个字典:键应该是节点类型,值是特征名称的列表。

  • edge_feature_keys (List[str] or Dict[str, List[str]]) – 边特征名称表示需要读取的边特征。 - 如果 edge_features 是一个列表:表示图是同质图,列表中的 ‘str’ 是特征名称。 - 如果 edge_features 是一个字典:键是边类型,格式为 ‘str:str:str’,值是特征名称的列表。