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 a typo bug where 'id2label' was incorrectly written as 'i2label' when reading config #34637

Conversation

ZuoChenFttS
Copy link
Contributor

fix a typo bug in examples/pytorch/image-classification/run_image_classification_no_trainer.py where 'id2label' was incorrectly written as 'i2label' when reading pretrained config

What does this PR do?

Fix a typo bug in examples/pytorch/image-classification/run_image_classification_no_trainer.py
Where 'id2label' was incorrectly written as 'i2label' when reading pretrained config;
This bug will cause the saved config to not properly reflect the relationship between tags and ids.

Before submitting

  • [ √] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Nice catch, thank you!

@LysandreJik LysandreJik merged commit c772d4d into huggingface:main Nov 18, 2024
8 checks passed
BernardZach pushed a commit to BernardZach/transformers that referenced this pull request Dec 5, 2024
…when reading config (huggingface#34637)

fix a bug where 'id2label' was incorrectly written as 'i2label' when reading the config from pretrained config
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