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

Check auto mappings could be imported via from transformers #24400

Merged
merged 6 commits into from
Jun 21, 2023

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Jun 21, 2023

What does this PR do?

As shown in #24364, we easily forget to add model mappings like TF_MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING to some __init__ files.

Let's add a check to avoid and could detect such issues as early as possible.

Along this new check, also add some missing mappings to __init__ files.

@@ -1028,6 +1028,7 @@
_import_structure["models.auto"].extend(
[
"MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING",
"MODEL_FOR_AUDIO_FRAME_CLASSIFICATION_MAPPING",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this shows the new check does its job!

@ydshieh ydshieh requested a review from sgugger June 21, 2023 12:19
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 21, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Collaborator

@sgugger sgugger 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 adding this!

@ydshieh ydshieh merged commit 0f968dd into main Jun 21, 2023
@ydshieh ydshieh deleted the check_auto_mapping_importable branch June 21, 2023 15:31
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