TypeError: __init__() got an unexpected keyword argument 'hub_token'

Hi, in response to the following error:

ValueError: You must login to the Hugging Face hub on this computer by typing transformers-cli login and entering your credentials to use use_auth_token=True. Alternatively, you can pass your own token as the use_auth_token argument

I added the ‘hub_token’ argument to ‘TrainingArguments’ as in the code below:

args = TrainingArguments(
    model_checkpoint[19:],
    evaluation_strategy='no',
    save_strategy='epoch',
    learning_rate=2e-5,
    num_train_epochs=3,
    weight_decay=0.01,
    fp16=False,
    push_to_hub=True,
    hub_token='xxxxxxxxxxxx',
)

Running this code results in the following error:

TypeError: init() got an unexpected keyword argument ‘hub_token’

Please advise.

Try updating your Transformers library, it looks like you have an older version.

Simple enough, thank you :smile: