Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Trainer.create_model_card() got an unexpected keyword argument 'revision' #185

Closed
tanliboy opened this issue Jul 31, 2024 · 2 comments · Fixed by #186
Closed

Comments

@tanliboy
Copy link

tanliboy commented Jul 31, 2024

When fine-tuning using the SFTTrainer, it failed in the last step in pushing the model to the hub.

The exception is as below:

    trainer.push_to_hub(revision=training_args.hub_model_revision, **kwargs)
  File "/opt/conda/envs/handbook/lib/python3.10/site-packages/trl/trainer/sft_trainer.py", line 475, in push_to_hub
    return super().push_to_hub(commit_message=commit_message, blocking=blocking, **kwargs)
  File "/opt/conda/envs/handbook/lib/python3.10/site-packages/transformers/trainer.py", line 4345, in push_to_hub
    self.create_model_card(model_name=model_name, **kwargs)
TypeError: Trainer.create_model_card() got an unexpected keyword argument 'revision'

I am on the latest versions of transformers (4.43.3) and trl (0.9.6). This problem seems to be related to the PR (#182) yesterday. Or did I miss something?

Cc @kashif

@kashif
Copy link
Contributor

kashif commented Jul 31, 2024

oh snap! ok let me see i think the create_model_card should not have that kwargs fixing!

@tanliboy
Copy link
Author

Thank you, @kashif !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants