deep-spin / sparse_text_generation

19 stars 6 forks source link

unexpected keyword argument 'loss' #1

Closed jb33k closed 2 years ago

jb33k commented 3 years ago
Traceback (most recent call last):
  File "train.py", line 324, in <module>
    train()
  File "train.py", line 213, in train
    model = model_class.from_pretrained(args.model_checkpoint, loss=loss_func)
  ...
  TypeError: __init__() got an unexpected keyword argument 'loss'

I'm getting this error. I checked HuggingFace's docs at https://huggingface.co/transformers/main_classes/model.html#transformers.PreTrainedModel.from_pretrained and there really doesn't seem to be a loss argument. Was this available in the earlier version or just a bug?

shuaizhao95 commented 3 years ago

Hello, I want to know about the data preprocessing method. Is it convenient for you to let me know? @jb33k