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

Deprecate models script - correctly set the model name for the doc file #30785

Merged
merged 2 commits into from
May 15, 2024

Conversation

amyeroberts
Copy link
Collaborator

What does this PR do?

There was a bug in #30184, in initial model name e.g. model_name was returned as the found model doc name, instead of the one which relates to the found path.

This means, if the model name has a different hyphenation, it's config cannot be found, and therefore it is not deprecated.

This fixes the issue for certain models e.g. gptsan_japanese.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@amyeroberts
Copy link
Collaborator Author

@ydshieh There was actually one remaining bug! I didn't catch because when I tested I wasn't using models with hyphens in the name.

Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

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

OK for me, thanks.

I am not sure if we have a correspondence of model_name to model_doc_path.
If no such correspondence exist, the current zip won't be enough (which gives 3 items), and a product (which gives the 9 combinations ...) would be required.

Anyway, I might overthinking and I am not really requiring a change in this PR.

@amyeroberts
Copy link
Collaborator Author

I am not sure if we have a correspondence of model_name to model_doc_path.

@ydshieh Ah, yes, it's a bit unclear from this diff. The model name returned here is set to model_doc_name here. So the correspondence should work, because the mapping is just between the name used and the doc path.

@amyeroberts amyeroberts merged commit 58faa7b into huggingface:main May 15, 2024
8 checks passed
@amyeroberts amyeroberts deleted the debug-deprecate-models branch May 15, 2024 14:14
@ydshieh
Copy link
Collaborator

ydshieh commented May 15, 2024

@amyeroberts

right, thanks!

itazap pushed a commit that referenced this pull request May 24, 2024
…le (#30785)

* Correctly set the moel name for the doc file

* Fix up
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request Jun 11, 2024
…le (huggingface#30785)

* Correctly set the moel name for the doc file

* Fix up
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.

3 participants