Closed ShangYuming closed 6 years ago
I splits the dataset into smaller groups for a faster evaluation. You should run each command in evalFB15k-237.sh, this will generate the evaluation files.
I'm very sorry. In the end I still couldn't run your test code because of missing files. I ran the evalFB15k.sh, still missing model-200.eval.4.txt can you tell me, How does your model have hit@3 and hit@1 effects on each dataset? Thank you very much!
You still have model-200.eval.0,1,2,3.txt. How many GPUs do you have? I noted in the first page that the evaluation process depends on the memory resources. When you open evalFB15k.sh, you can see:
CUDA_VISIBLE_DEVICES=1 nohup python eval.py --embedding_dim 100 --num_filters 50 --name FB15k-237 --useConstantInit True --model_name fb15k237 --num_splits 8 --testIdx 4 &
GPU id in this case is 1, I guess you have one GPU, so that's why you are missing model-200.eval.4.txt. You should change GPU id to 0.
To make sure everything running smoothly, you should run each command in evalFB15k.sh step-by-step, and check RAM-consuming in your GPU, you then know how many command you should run at the same time.
You can edit file eval.py to get Hits@1 and Hits@3 in a similar way to Hits@10 if you want.
Hi I found a similar problem when I was trying to run the code. In my runs/fb15k237/checkpoints directory, I only had "checkpoint model-200.data-00000-of-00001 model-200.index model-200.meta" these four files and I am confused how to generate model-200.eval.0,1,2,3.txt (txt files).
Thanks in advance!
You can see the commands in "evalFB15k-237.sh" that I just updated for a higher tf version. You can execute "evalFB15k-237.sh". You can also test an example command like: python eval.py --embedding_dim 100 --num_filters 50 --name FB15k-237 --useConstantInit --model_name fb15k237 --num_splits 8 --testIdx 7. The command will generate the text file model-200.eval.7.txt.
In case your machine is out of memory when executing "evalFB15k-237.sh", you should run each command in the file, and check RAM-consuming in your GPU, so you know how many command you should run at the same time. See the "evaluation metrics" section.
Thank you for your code, it helps me a lot! I am a fresh man, and my English is really poor, I run the code following your README when I run the eval code, there is an error like this:
In the directory "checkpoints",there are checkpoint model-200.data-00000of-00001 model-200.index model-200.meta
four files