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
I am getting a KeyError when I run any of the setting (extractive/abstractive). Has anyone come across this? I have all the .pt datasets and it is loading all of them as you can see in the first part of the log file.
[2021-12-03 04:00:45,621 INFO] loading file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt from cache at ../temp/26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084
gpu_rank 0
[2021-12-03 04:00:45,654 INFO] * number of parameters: 75951418
[2021-12-03 04:00:45,655 INFO] Start training...
[2021-12-03 04:00:45,766 INFO] Loading train dataset from ../bert_data/cnndm.train.18.bert.pt, number of examples: 1998
Traceback (most recent call last):
File "train.py", line 122, in
train_abs(args, device_id)
File "/content/PreSumm/src/train_abstractive.py", line 273, in train_abs
train_abs_single(args, device_id)
File "/content/PreSumm/src/train_abstractive.py", line 334, in train_abs_single
trainer.train(train_iter_fct, args.train_steps)
File "/content/PreSumm/src/models/trainer.py", line 142, in train
for i, batch in enumerate(train_iter):
File "/content/PreSumm/src/models/data_loader.py", line 142, in iter
for batch in self.cur_iter:
File "/content/PreSumm/src/models/data_loader.py", line 278, in iter
for idx, minibatch in enumerate(self.batches):
File "/content/PreSumm/src/models/data_loader.py", line 256, in create_batches
for buffer in self.batch_buffer(data, self.batch_size * 300):
File "/content/PreSumm/src/models/data_loader.py", line 224, in batch_buffer
ex = self.preprocess(ex, self.is_test)
File "/content/PreSumm/src/models/data_loader.py", line 195, in preprocess
tgt = ex['tgt'][:self.args.max_tgt_len][:-1]+[2]
KeyError: 'tgt'
The text was updated successfully, but these errors were encountered:
I am getting a KeyError when I run any of the setting (extractive/abstractive). Has anyone come across this? I have all the .pt datasets and it is loading all of them as you can see in the first part of the log file.
[2021-12-03 04:00:45,621 INFO] loading file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt from cache at ../temp/26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084
gpu_rank 0
[2021-12-03 04:00:45,654 INFO] * number of parameters: 75951418
[2021-12-03 04:00:45,655 INFO] Start training...
[2021-12-03 04:00:45,766 INFO] Loading train dataset from ../bert_data/cnndm.train.18.bert.pt, number of examples: 1998
Traceback (most recent call last):
File "train.py", line 122, in
train_abs(args, device_id)
File "/content/PreSumm/src/train_abstractive.py", line 273, in train_abs
train_abs_single(args, device_id)
File "/content/PreSumm/src/train_abstractive.py", line 334, in train_abs_single
trainer.train(train_iter_fct, args.train_steps)
File "/content/PreSumm/src/models/trainer.py", line 142, in train
for i, batch in enumerate(train_iter):
File "/content/PreSumm/src/models/data_loader.py", line 142, in iter
for batch in self.cur_iter:
File "/content/PreSumm/src/models/data_loader.py", line 278, in iter
for idx, minibatch in enumerate(self.batches):
File "/content/PreSumm/src/models/data_loader.py", line 256, in create_batches
for buffer in self.batch_buffer(data, self.batch_size * 300):
File "/content/PreSumm/src/models/data_loader.py", line 224, in batch_buffer
ex = self.preprocess(ex, self.is_test)
File "/content/PreSumm/src/models/data_loader.py", line 195, in preprocess
tgt = ex['tgt'][:self.args.max_tgt_len][:-1]+[2]
KeyError: 'tgt'
The text was updated successfully, but these errors were encountered: