Cyn7hia / PAED

This is a repository for our paper (PAED: Zero-Shot Persona Attribute Extraction in Dialogues) accepted in ACL'23.
9 stars 3 forks source link

AttributeError: 'Seq2SeqTrainingArguments' object has no attribute 'model_dir' #6

Open hurricanewhk opened 4 months ago

hurricanewhk commented 4 months ago

When running python trainer_finetune.py, I encounter this error:

Traceback (most recent call last): File "trainer_finetune.py", line 746, in run_eval(save_dir=save_dir, File "trainer_finetune.py", line 632, in run_eval path_model_ext = Path(train_args.model_dir) / "pytorch_model.bin" AttributeError: 'Seq2SeqTrainingArguments' object has no attribute 'model_dir'

I've checked the attributes of train_args, and didn't find the attribute named model_dir. Is there something wrong? The version of my transformers is 4.28.1.

Seq2SeqTrainingArguments( _n_gpu=4, adafactor=False, adam_beta1=0.9, adam_beta2=0.999, ... lr_scheduler_type=linear, max_grad_norm=1.0, max_steps=-1, metric_for_best_model=loss, mp_parameters=, no_cuda=False, num_train_epochs=5, optim=adamw_hf, optim_args=None, ...)

Cyn7hia commented 4 months ago

Hi, the model_dir is not predefined in Seq2SeqTrainingArguments, but it is defined through the process in the attached picture (trainer_finetune.py).

Screenshot 2024-05-28 at 12 36 08 AM