-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle node-level and edge-level temporal information when generating…
… partitions (#8718) **Description** **Temporal data definition:** Time data can be added to the FeatureStore in two ways: - it can be obtained directly from the partition using `LocalFeatureStore.from_partition()` function or - you can add them yourself using the `put_tensor()` function on the `LocalFeatureStore` object. - Node-level temporal data: each partition must have the same time vector, which is global and its size is equal to the number of nodes in the whole graph. Why: We operate on global node ids. - Edge-level temporal data: each partition has its own time vector, which is local for a given partition and its size is equal to the number of edges in the given partition (part_data.edge_index.size(1)). Why: Each partition has its own unique edge_index in COO format, which is later converted to a CSR/CSC matrix in the neighbor sampler. So we do not have information about the global edge IDs when sampling and we would not be able to find the correct time information for a specific edge. Therefore, this information must be local. **How to distinguish node-level or edge-level temporal data:** - `time_attr`='time' for node-level temporal sampling. - `time_attr`='edge_time' for edge-level temporal sampling. It is different from a single machine case when both edge time and node time have `time_attr`='time'. It is handled this way because of the lack of the node_store/edge_store in the feature store, so at the moment we determine whether to use node-level or edge-level temporal sampling based on the attribute name. **Where temporal data is saved:** - `time` has been added to the node features -> node_feats.pt - `edge_time` has been added to the edge features -> edge_feats.pt --------- Co-authored-by: rusty1s <matthias.fey@tu-dortmund.de>
- Loading branch information
Showing
5 changed files
with
295 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.