-
Notifications
You must be signed in to change notification settings - Fork 95
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
KeyError: 'id' is reported when I run the pretrain.py #55
Comments
I change GDELT to ICEWS14, however still the same problem... $ python3 pretrain.py -d ICEWS14 --gpu 0 --dropout 0.5 --n-hidden 200 --lr 1e-3 --max-epochs 20 --batch-size 1024 |
batched_graph.ndata['h'] = ent_embeds[batched_graph.ndata['id']].view(-1, ent_embeds.shape[1]) |
已经转到gpu了 但是还是报同样的错 |
你的get_history_graph.py里,方法get_data_with_t有改过吗?
|
你的get_history_graph.py里,方法get_data_with_t有改过吗? |
我没有改 这里的代码我觉得没有问题 |
这个方法你打印过中间结果吗,我之前遇到['id']报错,就是因为这里执行不对,导致batched_graph为空。 |
ICEWS14里面没有valid.txt |
嗯
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2022年3月31日(星期四) 下午4:28
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [INK-USC/RE-Net] KeyError: 'id' is reported when I run the pretrain.py (Issue #55)
请问这部分是这样子改的吗?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
请问最后解决了吗??解决的方案是什么 |
我有解决这个问题,请参考: |
excuse me,does anyone know how to deal?
batched_graph.ndata['h'] = ent_embeds[batched_graph.ndata['id']].view(-1, ent_embeds.shape[1]) File "/home/xxxx/anaconda3/envs/renet/lib/python3.6/site-packages/dgl/view.py", line 60, in __getitem__ return self._graph.get_n_repr(self._nodes)[key] KeyError: 'id'
it seems like something wrong with code
batched_graph.ndata['h'] = ent_embeds[batched_graph.ndata['id']].view(-1, ent_embeds.shape[1])
but I don‘t know how to deal with the problem
The text was updated successfully, but these errors were encountered: