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

Error in transformRedditGraph2NPZ.py #17

Open
xz-keg opened this issue Apr 18, 2019 · 4 comments
Open

Error in transformRedditGraph2NPZ.py #17

xz-keg opened this issue Apr 18, 2019 · 4 comments

Comments

@xz-keg
Copy link

xz-keg commented Apr 18, 2019

I download the reddit data from snap and unzip it, and run

python transformRedditGraph2NPZ.py

Then it shows the following error message.

Traceback (most recent call last):
File "transformRedditGraph2NPZ.py", line 69, in
transferRedditDataFormat("reddit","reddit.npz")
File "transformRedditGraph2NPZ.py", line 46, in transferRedditDataFormat
train_ids = [n for n in G.nodes() if not G.node[n]['val'] and not G.node[n]['test']]
File "transformRedditGraph2NPZ.py", line 46, in
train_ids = [n for n in G.nodes() if not G.node[n]['val'] and not G.node[n]['test']]
KeyError: 'val'

Is there a bug? Or is it because of other issues? Thanks.

@matenure
Copy link
Owner

Probably due to the data difference. There is no "val" feature in your data.
I believe you can solve it by editing some part of the codes. Thanks.

@ZW-ZHANG
Copy link

I think this is due to networkx version and fix it by degrading to networkx 1.10.0, as mentioned in #3

@KaiHuangMO
Copy link

thanks ZW-ZHAGN

@KaiHuangMO
Copy link

KaiHuangMO commented Jun 3, 2020

If anyone directly use transformRedditGraph2NPZ.py
feats[:, 0] = np.log(feats[:, 0] + 1.0) should be midified

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

4 participants