huggingface / huggingface/blog
__init__() got an unexpected keyword argument 'prediction_loss_only'
- Dominant language
- Jupyter Notebook
- Stars
- 3.5k
- Forks
- 1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 19
Description
I'm following the "01_how_to_train.ipynb" notebook to build my own model on the "multi_news" dataset and have ran into this error after running the following portion of the code:
```
from transformers import Trainer, TrainingArguments
training_args = TrainingArguments(
output_dir="/Users/username/.cache/huggingface/datasets/multi_news/default/1.0.0/465b14e19b4d6a55c9bb9131ca1de642175872143c9b231bee1dce789311b449",
overwrite_output_dir=True,
num_train_epochs=1,
per_gpu_train_batch_size=64,
save_steps=10_000,
save_total_limit=2,
)
trainer = Trainer(
model=model,
args=training_args,
data_collator=data_collator,
train_dataset=dataset,
prediction_loss_only=True,
)
```
The exact error reads
TypeError Traceback (most recent call last)
in
11 )
12
---> 13 trainer = Trainer(
14 model=model,
15 args=training_args,
TypeError: __init__() got an unexpected keyword argument 'prediction_loss_only'
How would you suggest fixing this issue?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.