Description
Just a heads up that in DynamicGraphTemporalSignal
and other iterators, edge_weights
maps directly onto edge_attr
into torch_geometric.data.Data
.
Specifically, in dynamic_graph_temporal_signal.py
, a Data
object is passed back as a snapshot, where edge_weight
(pulled from edge_weights
) is passed into the edge_attr
parameter of data.Data
.
This has some key effects for dealing with snapshots in Pytorch Geometric Temporal:
- When inspecting a
Data
object coming out of aDynamicGraphTemporalSignal
iteration,edge_weights
will appear in theedge_attr
field. DynamicGraphTemporalSignal
accepts akwargs
parameter for snapshots where you can include arbitrary features with a snapshot. If you include aedge_attr
field in thiskwargs
, it will overwrite youredge_weights
into theData
object.edge_weights
can hold multiple features per edge, sinceedge_attr
can support a multi-dimensional tensor per edge.
In the documentation, it's unclear in many places whether edge_weights
can support multiple features (it can), or how edge_weights
maps to edge_attr
(it does). I propose we clean up the documentation to clarify this, or rename edge_weights
as edge_attr
in the code to be consistent with PyG / PyTorch Geometric.
In the meantime, highly recommend inspecting your snapshot torch_geometric.data.Data
objects coming out of the iterators (such as DynamicGraphTemporalSignal
to understand their shape before training.