With my script the model is correctly trained and the results are printed, but the results
directory is empty. How is that? What is lacking? I think I should have the files described in this answer.
training_args = Seq2SeqTrainingArguments(
output_dir="./results",
evaluation_strategy="epoch",
learning_rate=2e-5,
per_device_train_batch_size=16,
per_device_eval_batch_size=16,
weight_decay=0.01,
save_total_limit=3,
num_train_epochs=1,
fp16=False,
)
trainer = Seq2SeqTrainer(
model=model,
args=training_args,
train_dataset=tokenized_dataset["train"],
eval_dataset=tokenized_dataset["valid"],
tokenizer=tokenizer,
data_collator=data_collator,
)
trainer.train()