I am trying to train a T5 model based on spellcheck by providing it with a sample csv file in google colab. Initially I ran the code with my personal device (python locally installed) and it executed without any errors but after switching to a different device (no python setup) it gives me an error.
training_args = TrainingArguments(
output_dir="./spellcheck_model",
per_device_train_batch_size=16,
num_train_epochs=3,
logging_steps=100,
save_steps=500,
save_total_limit=2,
evaluation_strategy="steps",
eval_steps=500,
learning_rate=5e-5,
report_to="none"
)
Here is my training code and the error which I'm receiving is:
TypeError Traceback (most recent call last)
<ipython-input-8-f33950e92b43> in <cell line: 0>()
67
68 # 4. Training settings
---> 69 training_args = TrainingArguments(
70 output_dir="./spellcheck_model",
71 per_device_train_batch_size=16,
TypeError: TrainingArguments.__init__() got an unexpected keyword argument 'evaluation_strategy
To check the issue I have run the command below and it does seems okay for me to continue and that the code should run
import transformers
print(transformers.__version__)
print(transformers.__file__)
The output is
4.51.3
/usr/local/lib/python3.11/dist-packages/transformers/__init__.py
How to fix this ?
eval_strategyand notevaluation_strategy.