benedekrozemberczki / pytorch_geometric_temporal

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

Wrong import: torch_geometric.utils.to_dense_adj #267

Open ber0i opened 4 months ago

ber0i commented 4 months ago

Hi, There is a broken import in torch_geometric_temporal\nn\attention\tsagcn.py, line 6: from torch_geometric.utils.to_dense_adj import to_dense_adj should be changed to from torch_geometric.utils._to_dense_adj import to_dense_adj. Would be great if that could be fixed. Thanks!

anna-inf-met commented 3 months ago

Really hoping the above can be fixed, in order to be able to use torch geometric temporal

Ziqi-Li commented 3 months ago

@anna-inf-met You can just change your local tsagcn.py as suggested by @ber0i .

louiswng commented 2 months ago

@anna-inf-met You can just change your local tsagcn.py as suggested by @ber0i .

In what directory should I put the tsagcn.py file? What is the directory structure? Could you please provide more information?

ber0i commented 2 months ago

@louiswng When installing a package, say torch_geometric_temporal, the corresponding code is stored somewhere on your computer. For example, I use miniconda and all torch_geometric_temporal code installed to a virtual environment can be found in

C:\Users[user name]\AppData\Local\miniconda3\envs[env name]\Lib\site-packages\torch_geometric_temporal

You can then navigate to torch_geometric_temporal\nn\attention\tsagcn.py and open and edit the code as described above.

Does that help? Let me know if there's still an open question. :)

louiswng commented 2 months ago

@louiswng When installing a package, say torch_geometric_temporal, the corresponding code is stored somewhere on your computer. For example, I use miniconda and all torch_geometric_temporal code installed to a virtual environment can be found in

C:\Users[user name]\AppData\Local\miniconda3\envs[env name]\Lib\site-packages\torch_geometric_temporal

You can then navigate to torch_geometric_temporal\nn\attention\tsagcn.py and open and edit the code as described above.

Does that help? Let me know if there's still an open question. :)

Problem solved, thank you very much.

christoschr97 commented 1 week ago

Hey people! Any update on this bug?

ber0i commented 1 week ago

Hey people! Any update on this bug?

Unfortunately not, I've recently installed the package in another environment and had to do the manual fix again. It just takes a second though :)