[doc] Fix missing trainer import (#16469)

This commit is contained in:
Wesley A. Cheng
2022-03-29 09:57:43 -07:00
committed by GitHub
parent 6358a4c8ec
commit 875e07a9e3

View File

@@ -121,7 +121,7 @@ Call `compute` on `metric` to calculate the accuracy of your predictions. Before
If you'd like to monitor your evaluation metrics during fine-tuning, specify the `evaluation_strategy` parameter in your training arguments to report the evaluation metric at the end of each epoch: If you'd like to monitor your evaluation metrics during fine-tuning, specify the `evaluation_strategy` parameter in your training arguments to report the evaluation metric at the end of each epoch:
```py ```py
>>> from transformers import TrainingArguments >>> from transformers import TrainingArguments, Trainer
>>> training_args = TrainingArguments(output_dir="test_trainer", evaluation_strategy="epoch") >>> training_args = TrainingArguments(output_dir="test_trainer", evaluation_strategy="epoch")
``` ```