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 “SER_Hubert.py”, line 311, in
Trainer.save_model(“/…path…/”)
File “/home/…lib/python3.8/site-packages/transformers/trainer.py”, line 2801, in save_model
output_dir = self.args.output_dir
AttributeError: ‘str’ object has no attribute ‘args’

The line 2801 in the ‘trainer.py’ 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:?
Thanks!
Siavosh