FeatureFetcherΒΆ
-
class
dgl.graphbolt.
FeatureFetcher
(datapipe, feature_store, node_feature_keys=None, edge_feature_keys=None)[source]ΒΆ Bases:
torch.utils.data.datapipes.datapipe.IterDataPipe
[torch.utils.data.datapipes.iter.callable.T_co
]A feature fetcher used to fetch features for node/edge in graphbolt.
Functional name:
fetch_feature
.- Parameters
datapipe (DataPipe) β The datapipe.
feature_store (FeatureStore) β A storage for features, support read and update.
node_feature_keys (List[str] or Dict[str, List[str]]) β Node features keys indicates the node features need to be read. - If node_features is a list: It means the graph is homogeneous graph, and the βstrβ inside are feature names. - If node_features is a dictionary: The keys should be node type and the values are lists of feature names.
edge_feature_keys (List[str] or Dict[str, List[str]]) β Edge features name indicates the edge features need to be read. - If edge_features is a list: It means the graph is homogeneous graph, and the βstrβ inside are feature names. - If edge_features is a dictionary: The keys are edge types, following the format βstr:str:strβ, and the values are lists of feature names.