cai-lw / KBGAN

Code for "KBGAN: Adversarial Learning for Knowledge Graph Embeddings" https://arxiv.org/abs/1711.04071
MIT License
212 stars 57 forks source link

KeyError: 'test_batch_size' #2

Closed esmab closed 6 years ago

esmab commented 6 years ago

Hi Liwei,

When I run: python3 pretrain.py --config=config_fb15k237.yaml --pretrain_config=TransE

I get this error after the 50th epoch: Traceback (most recent call last): File "pretrain.py", line 49, in gen.pretrain(train_data, corrupter, tester) File "/KBGAN/trans_e.py", line 80, in pretrain test_perf = tester() File "pretrain.py", line 32, in tester = lambda: gen.test_link(valid_data, n_ent, heads, tails) File "/KBGAN/base_model.py", line 100, in test_link for batch_s, batch_r, batch_t in batch_by_size(config().test_batch_size, *test_data): KeyError: 'test_batch_size'

I get a similar error when I change the option to: --pretrain_config=DistMult. Any idea what might be going wrong? Thanks!

cai-lw commented 6 years ago

I put test_batch_size in the wrong place in the config file when I refactored the code before release. (this parameter was a hardcoded constant before) I will check in a fix within a few hours.