diff --git a/docs/source/transformers_integrations.mdx b/docs/source/transformers_integrations.mdx index 6798775a..cf87f487 100644 --- a/docs/source/transformers_integrations.mdx +++ b/docs/source/transformers_integrations.mdx @@ -3,12 +3,12 @@ To run the 🤗 Transformers examples make sure you have installed the following libraries: ```bash -pip install datasets transformers torch evaluate nltk rouge_score +pip install datasets transformers torch accelerate evaluate nltk rouge_score scikit-learn ``` ## Trainer -The metrics in `evaluate` can be easily integrated with the [`~transformers.Trainer`]. The `Trainer` accepts a `compute_metrics` keyword argument that passes a function to compute metrics. One can specify the evaluation interval with `eval_strategy` in the [`~transformers.TrainerArguments`], and based on that, the model is evaluated accordingly, and the predictions and labels passed to `compute_metrics`. +The metrics in `evaluate` can be easily integrated with the [`~transformers.Trainer`]. The `Trainer` accepts a `compute_metrics` keyword argument that passes a function to compute metrics. One can specify the evaluation interval with `eval_strategy` in the [`~transformers.TrainingArguments`], and based on that, the model is evaluated accordingly, and the predictions and labels passed to `compute_metrics`. ```python from datasets import load_dataset @@ -121,7 +121,7 @@ trainer = Seq2SeqTrainer( args=training_args, train_dataset=tokenized_billsum["train"], eval_dataset=tokenized_billsum["test"], - tokenizer=tokenizer, + processing_class=tokenizer, data_collator=data_collator, compute_metrics=compute_metrics )