FastGCN icon indicating copy to clipboard operation
FastGCN copied to clipboard

Error in transformRedditGraph2NPZ.py

Open xz-keg opened this issue 6 years ago • 4 comments

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.

xz-keg avatar Apr 18 '19 13:04 xz-keg

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.

matenure avatar Apr 19 '19 01:04 matenure

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

ZW-ZHANG avatar Jul 26 '19 22:07 ZW-ZHANG

thanks ZW-ZHAGN

KaiHuangMO avatar May 25 '20 11:05 KaiHuangMO

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

KaiHuangMO avatar Jun 03 '20 06:06 KaiHuangMO