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

Don't set finetuned_from if it is a local path #28482

Merged
merged 2 commits into from
Jan 15, 2024
Merged

Don't set finetuned_from if it is a local path #28482

merged 2 commits into from
Jan 15, 2024

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Jan 12, 2024

What does this PR do?

Fix base_model issue in #28286

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!

Just a small comment on the comment

@@ -559,7 +559,11 @@ def filter_corrupt_images(examples):
trainer.save_metrics("eval", metrics)

# 11. Write Training Stats and push to hub.
kwargs = {"finetuned_from": model_args.model_name_or_path, "tasks": "contrastive-image-text-modeling"}
finetuned_from = model_args.model_name_or_path
# If from a local directory, don't set `finetuned_from`
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be better to describe why here in the comment. It's clear from the code this is what's happening but not the motivation

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed it to

# If from a local directory, don't set `finetuned_from` as this is required to be a valid repo. id on the Hub.

@ydshieh ydshieh merged commit 64bdbd8 into main Jan 15, 2024
8 checks passed
@ydshieh ydshieh deleted the fix_base_model branch January 15, 2024 10:38
staghado pushed a commit to staghado/transformers that referenced this pull request Jan 15, 2024
* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
MadElf1337 pushed a commit to MadElf1337/transformers that referenced this pull request Jan 15, 2024
* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
wgifford pushed a commit to wgifford/transformers that referenced this pull request Jan 21, 2024
* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
AjayP13 pushed a commit to AjayP13/transformers that referenced this pull request Jan 22, 2024
* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
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.

None yet

2 participants