feizc/MLE-LLaMA

Trainer: evaluation requires an eval_dataset

lishangjin opened this issue · 1 comments

85%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊ | 200/234 [31:27<05:19, 9.38s/it]Traceback (most recent call last):
File "/data/lisj/llama/MLE-LLaMA/train_lora.py", line 79, in
trainer.train()
File "/data/lisj/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 1644, in train
return inner_training_loop(
File "/data/lisj/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 1988, in _inner_training_loop
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/data/lisj/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2245, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/data/lisj/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2940, in evaluate
eval_dataloader = self.get_eval_dataloader(eval_dataset)
File "/data/lisj/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 944, in get_eval_dataloader
raise ValueError("Trainer: evaluation requires an eval_dataset.")
ValueError: Trainer: evaluation requires an eval_dataset.

feizc commented

in line 51 you can uncomment with other data or just replace with: eval_dataset=train_data