clovaai / FocusSeq2Seq

[EMNLP 2019] Mixture Content Selection for Diverse Sequence Generation (Question Generation / Abstractive Summarization)
https://arxiv.org/abs/1909.01953
MIT License
113 stars 20 forks source link

How do I use --eval_only? #1

Closed alvin-leong closed 4 years ago

alvin-leong commented 5 years ago

I have run through the code following the instructions and trained a QG model. My best checkpoint was 7.

So this next time round, I just want to load the saved checkpoint and look at the outputs from the val set.

Here are my configs:

!python train.py --task=QG --model=NQG --load_glove=True --feature_rich --data=squad \ --load --load_ckpt=7 --eval_only

I keep on getting this error:

Traceback (most recent call last): File "train.py", line 136, in n_iter = len(train_loader) TypeError: object of type 'NoneType' has no len()

So if I understand it correctly, with eval_only, I should by-pass loading the training and validation sets and just test it.

However, there is no actual code in train.py to look at "eval_only" as far as I can see. It will always assume I am going through the whole training.

j-min commented 5 years ago

I just updated the evaluation commands here. Please check.