Saving the trained model "Trainer.save_model" error

I am using Hubert SER model. I would like to save the model after it’s been trained.
But I get an error message:

File “”, line 311, in
File “/home/…lib/python3.8/site-packages/transformers/”, line 2801, in save_model
output_dir = self.args.output_dir
AttributeError: ‘str’ object has no attribute ‘args’

The line 2801 in the ‘’ is:

if output_dir is None:
output_dir = self.args.output_dir

I am using Transformers 4.35.2

Could anyone help me resolve this issue? Please :roll_eyes:?