RUCAIBox/TextBox

[๐Ÿ›BUG] ๆˆ‘ๅœจไฝฟ็”จT5ๆจกๅž‹่ฎญ็ปƒcsl็š„ๆ—ถๅ€™็ขฐๅˆฐๅฆ‚ไธ‹้—ฎ้ข˜ใ€‚

01vanilla opened this issue ยท 3 comments

ๆ่ฟฐ่ฟ™ไธช bug
ๆˆ‘ๅœจไฝฟ็”จT5ๆจกๅž‹่ฎญ็ปƒcsl็š„ๆ—ถๅ€™็ขฐๅˆฐๅฆ‚ไธ‹้—ฎ้ข˜๏ผŒๅ…ทไฝ“ๆ˜ฏไป€ไนˆ้—ฎ้ข˜ๆˆ‘่ฟ˜ไธๅคชๆ˜Ž็™ฝใ€‚

ๅฆ‚ไฝ•ๅค็Žฐ
python run_textbox.py --model=T5 --model_path=t5-small --dataset=csl

ๆ—ฅๅฟ—
Trainable parameters: 60492288
04 May 22:56 INFO ====== Start training ======
train 1: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 188/188 [00:19<00:00, 9.76step/s, loss=2.19]
04 May 22:57 INFO Train epoch 1 [time: 19.27s, loss: 2.19]
generating: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 32/32 [00:08<00:00, 3.87it/s]
04 May 22:57 ERROR Traceback (most recent call last):
File "/hy-tmp/TextBox/textbox/utils/dashboard.py", line 311, in new_experiment
yield True
File "/hy-tmp/TextBox/textbox/quick_start/experiment.py", line 140, in run
self._do_train_and_valid()
File "/hy-tmp/TextBox/textbox/quick_start/experiment.py", line 115, in _do_train_and_valid
self.valid_result = self.trainer.fit(train_data, valid_data)
File "/hy-tmp/TextBox/textbox/trainer/trainer.py", line 456, in fit
self.stopped |= self._valid(valid_data, 'epoch')
File "/usr/local/miniconda3/envs/TextBox/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/hy-tmp/TextBox/textbox/trainer/trainer.py", line 294, in _valid
valid_results = self.evaluate(valid_data, is_valid=True)
File "/usr/local/miniconda3/envs/TextBox/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/hy-tmp/TextBox/textbox/trainer/trainer.py", line 568, in evaluate
result = self.evaluator.evaluate(generate_corpus, reference_dataset)
File "/hy-tmp/TextBox/textbox/evaluator/base_evaluator.py", line 156, in evaluate
metric_result = evaluator.evaluate(generate_corpus, reference_corpus, avg=avg)
File "/hy-tmp/TextBox/textbox/evaluator/abstract_evaluator.py", line 31, in evaluate
metric_dict = self._calc_metrics_info(generate_corpus=generate_corpus, reference_corpus=reference_corpus)
File "/hy-tmp/TextBox/textbox/evaluator/rouge_evaluator.py", line 71, in _calc_metrics_info
scores = rouge.get_scores(generate_corpus.tokenized_text, reference_corpus, avg=True)
File "/usr/local/miniconda3/envs/TextBox/lib/python3.8/site-packages/rouge/rouge.py", line 108, in get_scores
return self._get_avg_scores(hyps, refs)
File "/usr/local/miniconda3/envs/TextBox/lib/python3.8/site-packages/rouge/rouge.py", line 148, in _get_avg_scores
sc = fn(hyp, ref, exclusive=self.exclusive)
File "/usr/local/miniconda3/envs/TextBox/lib/python3.8/site-packages/rouge/rouge.py", line 53, in
"rouge-1": lambda hyp, ref, **k: rouge_score.rouge_n(hyp, ref, 1, **k),
File "/usr/local/miniconda3/envs/TextBox/lib/python3.8/site-packages/rouge/rouge_score.py", line 255, in rouge_n
raise ValueError("Reference is empty.")
ValueError: Reference is empty.ใ€‚

ๆˆ‘ไฝฟ็”จ็š„torch็‰ˆๆœฌไธบ2.0.0+cu117

ๆˆ‘ไปฌๅทฒ็ปๅœจๆœ€ๆ–ฐ็š„prไฟฎๅคไบ†่ฟ™ไธช้—ฎ้ข˜๏ผŒไธ่ฟ‡ๆˆ‘ไปฌๅ‘็ŽฐT5ๅนถไธ่ƒฝๅพˆๅฅฝ็š„ๅฏนไธญๆ–‡่ฟ›่กŒๅˆ†่ฏ๏ผŒ่ฟ™ไนŸๆ˜ฏๅฏผ่‡ด่ฟ™ไธช้”™่ฏฏ็š„ๅŽŸๅ› ๏ผŒๅปบ่ฎฎไฝฟ็”จCPT็ญ‰ไธญๆ–‡ๆจกๅž‹ๆˆ–่€…ๅ…ถไป–ๅคš่ฏญๆจกๅž‹่ฟ›่กŒๅฎž้ชŒใ€‚

ๆœ€ๆ–ฐ็š„prๆˆ‘ๆ˜ฏ้œ€่ฆๆŠŠไปฃ็ ้‡ๆ–ฐไธ‹่ฝฝไธ€้ๅ—

ไฝ ๅฏไปฅgit pullๆˆ–่€…็›ดๆŽฅไธ‹่ฝฝ