ZikangZhou / HiVT

[CVPR 2022] HiVT: Hierarchical Vector Transformer for Multi-Agent Motion Prediction
https://openaccess.thecvf.com/content/CVPR2022/papers/Zhou_HiVT_Hierarchical_Vector_Transformer_for_Multi-Agent_Motion_Prediction_CVPR_2022_paper.pdf
Apache License 2.0
577 stars 115 forks source link

Environment Configuration #5

Closed XM-WANG closed 2 years ago

XM-WANG commented 2 years ago

Hi, I am still confused about the environment:

I follow the instructions:

conda create -n HiVT python=3.8
conda activate HiVT
conda install pytorch==1.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
conda install pytorch-geometric==1.7.2 -c rusty1s -c conda-forge
conda install pytorch-lightning==1.5.2 -c conda-forge

And get an error:

ModuleNotFoundError: No module named 'torch_geometric.data.storage'

It seems that the PyG should be greater than 2.0.x (see this link)

However, after upgrading PyG to 2.0.1, a new error appeared:

TypeError: inc() takes 3 positional arguments but 4 were given

Do you have any ideas? Many thanks!

ZikangZhou commented 2 years ago

Hello,

PyG 2 is somewhere incompatible with PyG 1 (see PyG 2.0), while this repo uses PyG 1.7.2. Please make sure that you install 1.7.2.

If you use PyG 1.7.2, you need to import Dataloader from torch_geometric.data and I think you won't meet such an error.

XM-WANG commented 2 years ago

Sorry I didn't make it clear.

I indeed install those packages following the instructions in README. And then execute:

python train.py --root datasets/ --embed_dim 64

Then I got the error:

ModuleNotFoundError: No module named 'torch_geometric.data.storage'

XM-WANG commented 2 years ago

image I also verified in the IDEL, that the version is correct.

XM-WANG commented 2 years ago

Oh, I suppose I know why this error occurred.

As I met some other environment errors yesterday (issue), I fixed myself.

At that time I am not sure which part is wrong, so I changed many packages with different versions. And found that it is because of the wrong torch. (torch 1.8.1 with conda)

Then I ran train.py and it started to process the data and took around 12 hours.

And today I met errors:

TypeError: inc() takes 3 positional arguments but 4 were given

and re-install these packages.

However, those data have been processed with the wrong version (PyG 2.x) and didn't re-processed again, so that lead to the error:

ModuleNotFoundError: No module named 'torch_geometric.data.storage'

I will delete all processed data and re-try again.

Sorry for bothering you again.