ctongfei / hierarchical-typing

Hierarchical entity typing via multi-level learning to rank
12 stars 7 forks source link

how to test the trained model? #3

Open 22842219 opened 3 years ago

22842219 commented 3 years ago

Hi tongfei,

It is zea again. Currently, I've trained your model and now I wanna run the trained model on test dataset, but I can't find any PLAN in test.tape, and then I added a plan in the following way.

''' plan TestBBN { reach test via (Dataset: BBN) } '''

and then I've got an error in the following. Any idea about it? Thanks.

ERROR train/Dataset.BBN: INFO:allennlp.training.checkpointer:Best validation performance so far. Copying weights to '/media/hierarchical-typing/out/train/Dataset.BBN/out/best.th'. train/Dataset.BBN: INFO:hiertype.training.my_trainer:Epoch duration: 0:07:16.906099 train/Dataset.BBN: INFO:allennlp.training.checkpointer:loading best weights Completed train/Dataset.BBN/6 Acquiring lock for test/Dataset.BBN/6 Running test/Dataset.BBN/6 in /media/hierarchical-typing/out/test/Dataset.BBN Using submitter shell test/Dataset.BBN: ERROR: Missing required flags: {'model'} test/Dataset.BBN: Usage: run.py test/Dataset.BBN: required flags: --model | --model_file | --test | --out | test/Dataset.BBN: --max_branching_factors | --delta | --strategies | test/Dataset.BBN: --other_delta | --seed | --batch_size | --gpuid test/Dataset.BBN: test/Dataset.BBN: For detailed information on this command, run: test/Dataset.BBN: run.py --help Failed test/Dataset.BBN/6: Task test/Dataset.BBN/6 failed The following tasks failed: FAILED: test/Dataset.BBN/6 ERROR: Task test/Dataset.BBN/6 failed

Best, Zea

ctongfei commented 3 years ago

It requires the flag --model however in the test.tape file it has --model_dir. Change --model_dir in test.tape to --model.