You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Abstractive is working well, but extractive with the following command:
python train.py -task ext -mode train -bert_data_path ../data/bert_data_cnn10k/cnndm -ext_dropout 0.1 -model_path ../models/cnn10_ext -lr 2e-3 -visible_gpus 0 -report_every 50 -save_checkpoint_steps 1000 -batch_size 3000 -train_steps 50000 -accum_count 2 -log_file ../logs/ext_bert_cnndm -use_interval true -warmup_steps 10000 -max_pos 512
This is the output:
Traceback (most recent call last):
File "train.py", line 144, in
train_ext(args, device_id)
File "/home/ubuntu/jose/PreSumm/src/train_extractive.py", line 203, in train_ext
train_single_ext(args, device_id)
File "/home/ubuntu/jose/PreSumm/src/train_extractive.py", line 245, in train_single_ext
trainer.train(train_iter_fct, args.train_steps)
File "/home/ubuntu/jose/PreSumm/src/models/trainer_ext.py", line 137, in train
for i, batch in enumerate(train_iter):
File "/home/ubuntu/jose/PreSumm/src/models/data_loader.py", line 144, in iter
for batch in self.cur_iter:
File "/home/ubuntu/jose/PreSumm/src/models/data_loader.py", line 280, in iter
for idx, minibatch in enumerate(self.batches):
File "/home/ubuntu/jose/PreSumm/src/models/data_loader.py", line 258, in create_batches
for buffer in self.batch_buffer(data, self.batch_size * 300):
File "/home/ubuntu/jose/PreSumm/src/models/data_loader.py", line 230, in batch_buffer
size_so_far = self.batch_size_fn(ex, len(minibatch), self.args.max_ndocs_in_batch)
TypeError: ext_batch_size_fn() takes 2 positional arguments but 3 were given
The text was updated successfully, but these errors were encountered:
Can change the code in PreSumm/src/models/data_loader.py line 114 def ext_batch_size_fn(new,count) to => def ext_batch_size_fn(new,count,max_ndocs_in_batch=None)
The BertSumExt training will be runnable after that
Abstractive is working well, but extractive with the following command:
python train.py -task ext -mode train -bert_data_path ../data/bert_data_cnn10k/cnndm -ext_dropout 0.1 -model_path ../models/cnn10_ext -lr 2e-3 -visible_gpus 0 -report_every 50 -save_checkpoint_steps 1000 -batch_size 3000 -train_steps 50000 -accum_count 2 -log_file ../logs/ext_bert_cnndm -use_interval true -warmup_steps 10000 -max_pos 512
This is the output:
Traceback (most recent call last):
File "train.py", line 144, in
train_ext(args, device_id)
File "/home/ubuntu/jose/PreSumm/src/train_extractive.py", line 203, in train_ext
train_single_ext(args, device_id)
File "/home/ubuntu/jose/PreSumm/src/train_extractive.py", line 245, in train_single_ext
trainer.train(train_iter_fct, args.train_steps)
File "/home/ubuntu/jose/PreSumm/src/models/trainer_ext.py", line 137, in train
for i, batch in enumerate(train_iter):
File "/home/ubuntu/jose/PreSumm/src/models/data_loader.py", line 144, in iter
for batch in self.cur_iter:
File "/home/ubuntu/jose/PreSumm/src/models/data_loader.py", line 280, in iter
for idx, minibatch in enumerate(self.batches):
File "/home/ubuntu/jose/PreSumm/src/models/data_loader.py", line 258, in create_batches
for buffer in self.batch_buffer(data, self.batch_size * 300):
File "/home/ubuntu/jose/PreSumm/src/models/data_loader.py", line 230, in batch_buffer
size_so_far = self.batch_size_fn(ex, len(minibatch), self.args.max_ndocs_in_batch)
TypeError: ext_batch_size_fn() takes 2 positional arguments but 3 were given
The text was updated successfully, but these errors were encountered: