uoguelph-mlrg / LDG

PyTorch code for "Learning Temporal Attention in Dynamic Graphs with Bilinear Interactions"
https://arxiv.org/abs/1909.10367
Other
98 stars 24 forks source link

AttributeError: 'GithubDataset' object has no attribute 'time_bar' #9

Open lbq8942 opened 2 years ago

lbq8942 commented 2 years ago

In data_loader.py,

def __getitem__(self.index):
        time_bar = self.time_bar.copy()
        assert u != v, (tpl, rel)

but self has no no attribute 'time_bar'.

bknyaz commented 2 years ago

Hi, unfortunately our code is not very clean and does not follow good practice. In the case of time_bar, we set this variable in the main.py before getitem is called https://github.com/uoguelph-mlrg/LDG/blob/master/main.py#L368