Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batch training on linkx #1

Open
kyu823 opened this issue Jan 4, 2022 · 5 comments
Open

batch training on linkx #1

kyu823 opened this issue Jan 4, 2022 · 5 comments

Comments

@kyu823
Copy link

kyu823 commented Jan 4, 2022

I tried to do experiment with linkx, but when I used row sampling that paper suggested does not work.
I think it has some error in making sparse matrix.
Do you have plan to fix it or update it?

@cptq
Copy link
Collaborator

cptq commented Jan 5, 2022

Are you using the scripts in the "scalable_experiments" folder? Could you tell us what commands you are using, what the error message is, and what versions of pytorch / pytorch geometric you are using?

@imethanlee
Copy link

So I ran bash scalable_experiments/linkx_exp.sh wiki. I also manually downloaded the wiki data files and move it into the correct path. The error happened in line 57 in batch_utils.py.
image
I print the shape of this edge_index variable and it seems like it is a vector but not a matrix.
image

@Xiuyu-Li
Copy link
Member

I am able to run the script without issues with ogb==1.3.1, torch_geometric==1.7.2, and torch==1.8.1. Can you check what your ogb, torch_geometric, and torch versions are and try switching it to what I was using to see if the issue still preserves?

You may also want to use the command python main_scalable.py --dataset wiki --method link --weight_decay 0.01 --display_step 1 --runs 1 --train_batch row --num_parts 10 to check a single run first.

@Xiuyu-Li Xiuyu-Li reopened this Jul 22, 2022
@Xiuyu-Li
Copy link
Member

Xiuyu-Li commented Jul 22, 2022

Additionally, we updated the codebase and wiki data can be downloaded automatically now. You can also try pulling the newest changes, removing local wiki data, installing gdown by pip install gdown, and running bash scalable_experiments/linkx_exp.sh wiki in case there are problems with the local wiki data.

@VeritasYin
Copy link

I am able to run the script without issues with ogb==1.3.1, torch_geometric==1.7.2, and torch==1.8.1. Can you check what your ogb, torch_geometric, and torch versions are and try switching it to what I was using to see if the issue still preserves?

You may also want to use the command python main_scalable.py --dataset wiki --method link --weight_decay 0.01 --display_step 1 --runs 1 --train_batch row --num_parts 10 to check a single run first.

Hello, it seems that I have came across the same running error. I located the issue that it got triggered by the following line in batch_utils.py
self.edge_index = sort_edge_index(self.edge_index)[0]

Due to the update of PyG (>=2.0), the behavior of function sort_edge_index gets changed. edge_index is a 2 by E tensor, but sort_edge_index sorts edges by rows in default. Thus, it returns a 1D tensor instead of the sorted 2D tensor, which leads to the 'index out of range' error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants