benedekrozemberczki / pytorch_geometric_temporal

PyTorch Geometric Temporal: Spatiotemporal Signal Processing with Neural Machine Learning Models (CIKM 2021)
MIT License
2.63k stars 370 forks source link

Issue in _check_temporal_consistency for DynamicHeteroGraphTemporalSignal? #273

Closed pauvilasoler closed 5 months ago

pauvilasoler commented 5 months ago

Hi,

I think there might be an inconsistency in the way _check_temporal_consistency for Heterogeneous Signal objects is currently set up as I was getting some errors while trying to create a Heterogeneous data object.

More specifically, I think there is an issue in this command (lines 61-63):

assert len(self.feature_dicts) == len( self.edge_weight_dicts ), "Temporal dimension inconsistency."

If I am not mistaken, what len(self.feature_dicts) returns is the length of the features dictionary (i.e. the number of node types) whereas what len(self.edge_weights_dicts) returns is the number of relationship types.

If that is the case:

  1. I fail to see why that is being tested to check for temporal consistency (this also applies to the other assert statements in the method)
  2. It is raising incorrect errors as the number of node types should be able to be different from the number of relationship types > I am specifically working with data that contains only one node type but multiple relationship types

(Unless I am getting wrong what feature_dicts and edge_weights_dicts are supposed to be, of course)

Would be great if someone could clarify.

Thanks a lot!