danieldeutsch / summarize

Apache License 2.0
13 stars 1 forks source link

Error in PGN's training and Time required for training #1

Closed ShibataGenjiro closed 4 years ago

ShibataGenjiro commented 4 years ago

Hello.

When I tried to run train.sh in the summary-cloze-master/experiments/deutsch2019/abstractive-step/pointer-generator. by

bash ./experiments/deutsch2019/abstractive-step/pointer-generator/train.sh extractive-model true

there was an error.

Traceback (most recent call last): File "/home/sss/anaconda3/envs/cloze/bin/allennlp", line 8, in sys.exit(run()) File "/home/sss/anaconda3/envs/cloze/lib/python3.6/site-packages/allennlp/run.py", line 18, in run main(prog="allennlp") File "/home/sss/anaconda3/envs/cloze/lib/python3.6/site-packages/allennlp/commands/init.py", line 102, in main args.func(args) File "/home/sss/anaconda3/envs/cloze/lib/python3.6/site-packages/allennlp/commands/train.py", line 124, in train_model_from_args args.cache_prefix) File "/home/sss/anaconda3/envs/cloze/lib/python3.6/site-packages/allennlp/commands/train.py", line 168, in train_model_from_file cache_directory, cache_prefix) File "/home/sss/anaconda3/envs/cloze/lib/python3.6/site-packages/allennlp/commands/train.py", line 226, in train_model cache_prefix) File "/home/sss/anaconda3/envs/cloze/lib/python3.6/site-packages/allennlp/training/trainer_pieces.py", line 65, in from_params model = Model.from_params(vocab=vocab, params=params.pop('model')) File "/home/sss/anaconda3/envs/cloze/lib/python3.6/site-packages/allennlp/common/from_params.py", line 365, in from_params return subclass.from_params(params=params, extras) File "/home/sss/anaconda3/envs/cloze/lib/python3.6/site-packages/allennlp/common/from_params.py", line 386, in from_params kwargs = create_kwargs(cls, params, extras) File "/home/sss/anaconda3/envs/cloze/lib/python3.6/site-packages/allennlp/common/from_params.py", line 135, in create_kwargs params.assert_empty(cls.name) File "/home/sss/anaconda3/envs/cloze/lib/python3.6/site-packages/allennlp/common/params.py", line 433, in assert_empty raise ConfigurationError("Extra parameters passed to {}: {}".format(class_name, self.params)) allennlp.common.checks.ConfigurationError: "Extra parameters passed to ClozePointerGeneratorModel: {'loss_normalization': 'tokens'}"

Then I checked summary-cloze-master\summarize\models\cloze\pointer_generator.py and summary-cloze-master\summarize\models\sds\pointer_generator.py, found that there is no parameter called loss_normalization but has parameters called instance_loss_normalization and batch_loss_normalization.

Then I checked another version of the source code in Tag:emnlp2019. I found that in this version, loss_normalization: str = 'summaries' is in the summarize/models/sds/pointer_generator.py and summarize/models/cloze/pointer_generator.py.

So I want to know which version is your final version? (If the Master Branch is your final version, how can I solve this problem?)

Another question I want to know is: What (and how many) GPUs did you use and how long did it take to train the PGN and PGN with coverage using these GPUs?

danieldeutsch commented 4 years ago

The tagged version should be the final version of the code that was used for the paper. It must be the case that I made some breaking changes after that and I did not fix the old config files (because it would mean retraining everything again). If you did retrain from the master, I think the equivalent loss normalization settings are instance_normalization='sum' and batch_normalization='average'.

The code only allows for 1 GPU, so that's all I used (sorry I don't remember which kind). From the original logs, I see that the extractive model training step took about 14 hours. The PGN took about 4 hours, and the additional fine tuning with the coverage loss took about 2 hours

ShibataGenjiro commented 4 years ago

OK, I will try to run the tagged version. Thank you for your quick reply!