hoops_ai.storage.PyGGraphStoreHandler
- class hoops_ai.storage.PyGGraphStoreHandler
Bases:
MLStorage- append_edata(edge_features, feature_name, torch_type=torch.float)
Stores edge features on the Data object.
The primary edge feature (name ‘x’) is stored as edge_attr following PyG convention. Other names are stored as-is.
- Parameters:
edge_features (ndarray)
feature_name (str)
torch_type (torch.dtype)
- Return type:
None
- append_extra_data(extra_data, feature_name, torch_type=torch.float)
Stores extra data in the extra_dict under the given name.
- Parameters:
extra_data (ndarray)
feature_name (str)
torch_type (torch.dtype)
- Return type:
None
- append_ndata(node_features, feature_name, torch_type=torch.float)
Stores node features on the Data object under the given attribute name.
- Parameters:
node_features (ndarray)
feature_name (str)
torch_type (torch.dtype)
- Return type:
None
- concatenate_data(target_tensor, source_tensor)
Concatenates two tensors along the last dimension.
- Parameters:
target_tensor (torch.Tensor)
source_tensor (torch.Tensor)
- Return type:
- load_graph(filepath)
Loads a PyG Data object from a .pt file.
- Parameters:
filepath (str)
- Return type:
torch_geometric.data.Data