yuetan031 / TADDY_pytorch

A Pytorch implement of paper "Anomaly detection in dynamic graphs via transformer" (TADDY).
MIT License
49 stars 13 forks source link

runtime error about the "data/eigen" folder #1

Closed Switchsyj closed 2 years ago

Switchsyj commented 2 years ago

Hi, I am running your code with the command: python 1_train.py --dataset uci --anomaly_per 0.1 after running: python 0_prepare_data.py --dataset uci And it shows that 'data/eigen/uci_0.5_0.1.pkl' not found, so I make a copy the same as which in the 'data/percent' folder. Is that correct? But actually I run into a bug with the traceback: $$$$ Start $$$$ Loading uci dataset... Loading eigen from: data/eigen/uci_0.5_0.1.pkl Traceback (most recent call last): File "1_train.py", line 56, in <module> setting_obj.run() File "/home/syj/syj_project/TADDY_pytorch/codes/Settings.py", line 8, in run loaded_data = self.dataset.load() File "/home/syj/syj_project/TADDY_pytorch/codes/DynamicDatasetLoader.py", line 173, in load adjs, eigen_adjs = self.get_adjs(rows, cols, weights, nb_nodes) File "/home/syj/syj_project/TADDY_pytorch/codes/DynamicDatasetLoader.py", line 134, in get_adjs eigen_adjs.append(np.array(eigen_adj_sparse.todense())) AttributeError: 'list' object has no attribute 'todense' And I totally have no idea why eigen_adj_sparse is a list? Could you please help me wtih this? Thanks in advance.

PS: actually my running environment matches yours.

Switchsyj commented 2 years ago

just generate a 'data/eigen' folder and program will help you generate eigen files.