pytorch_geometric_temporal icon indicating copy to clipboard operation
pytorch_geometric_temporal copied to clipboard

Batching of Graphs

Open HCelion opened this issue 1 year ago • 0 comments

Hi there, I am looking to apply graph models on small sequences of graphs. What is the suggested data type for this? Say we have 100 sequences of 3 graphs each and I want to train and predict on a sequence. If we assume the graph structure is the same, it seems to suggest that StaticGraphTemporalSignalBatch is the correct choice. Would be a batch_index of the sort [0,0,0,1,1,1, 2,2,2, ..., 99,99,99,100,100,100] be the correct approach.

In the docs it says about StaticGraphTemporalSignalBatch

 |  A data iterator object to contain a static graph with a dynamically
 |  changing constant time difference temporal feature set (multiple signals).
 |  The node labels (target) are also temporal. The iterator returns a single
 |  constant time difference temporal snapshot for a time period (e.g. day or week).
 |  This single temporal snapshot is a Pytorch Geometric Batch object. Between two
 |  temporal snapshots the feature matrix, target matrices and optionally passed
 |  attributes might change. However, the underlying graph is the same.

That would imply that a batch of 3 graphs is returned each time. Since the batch is from pytorch geometric how is order maintained on it?

Thank you!

HCelion avatar Feb 21 '25 13:02 HCelion