GSgnnData
- class graphstorm.dataloading.GSgnnData(part_config, node_feat_field=None, edge_feat_field=None, lm_feat_ntypes=None, lm_feat_etypes=None)
Bases:
objectThe GraphStorm data
Parameters
- part_configstr
The path of the partition configuration file.
- node_feat_field: str or dict of list of str
The fields of the node features that will be encoded by GSNodeInputLayer. It’s a dict if different node types have different feature names. Default: None
- edge_feat_fieldstr or dict of list of str
The fields of the edge features. It’s a dict if different edge types have different feature names. This argument is reserved by future usage. Default: None
- lm_feat_ntypeslist of str
The node types that contains text features. Default: None
- lm_feat_etypeslist of tuples
The edge types that contains text features. Default: None
- get_edge_feats(input_edges, efeat_fields, device='cpu')
Get the edge features
Parameters
- input_edgesTensor or dict of Tensors
The input edge IDs
- efeat_fields: str or dict of [str ..]
The edge data fields that stores the edge features to retrieve
- devicePytorch device
The device where the returned edge features are stored.
Returns
dict of Tensors : The returned edge features.
- get_node_feats(input_nodes, nfeat_fields, device='cpu')
Get the node features
Parameters
- input_nodesTensor or dict of Tensors
The input node IDs
- nfeat_fieldsstr or dict of list
The node features to collect from graph
- devicePytorch device
The device where the returned node features are stored.
Returns
dict of Tensors : The returned node features.