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

FIX [Trainer / tags]: Fix trainer + tags when users do not pass "tags" to trainer.push_to_hub() #29009

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

younesbelkada
Copy link
Contributor

What does this PR do?

As per title - and fixes: hiyouga/LLaMA-Factory#2474 (comment) raised by @hiyouga

Indeed, we should always push tags if there are any that are saved on the model. Currently the logic is wrong, as it pushes the tags only if "tags" is passed to trainer.push_to_hub(), in fact we should always push the tag if model.add_model_tags has been called, regardless if tags is passed or not in push_to_hub

cc @amyeroberts

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@younesbelkada younesbelkada merged commit 7a0fccc into huggingface:main Feb 14, 2024
20 of 21 checks passed
@younesbelkada younesbelkada deleted the fix-trainer-tags branch February 15, 2024 04:51
hackyon pushed a commit to hackyon/transformers that referenced this pull request Feb 15, 2024
…ags"` to `trainer.push_to_hub()` (huggingface#29009)

* fix trainer tags

* add test
itazap pushed a commit that referenced this pull request May 14, 2024
…ags"` to `trainer.push_to_hub()` (#29009)

* fix trainer tags

* add test
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 this pull request may close these issues.

2 participants