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 the config class comparison for remote code models #35592

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Rocketknight1
Copy link
Member

@Rocketknight1 Rocketknight1 commented Jan 9, 2025

The config class comparison previously used str(model_class.config_class), which resulted in mismatches because the actual class was loaded from a cache dir and therefore had the cache dir path as part of its full class name string.

This new test just uses model_class.__name__ which is much less error-prone.

Fixes #35584, related to #29854

@Rocketknight1 Rocketknight1 force-pushed the fix_config_class_comparison branch from 4c0d2ac to 0bb5b32 Compare January 9, 2025 14:46
@Rocketknight1
Copy link
Member Author

cc @ArthurZucker for review!

@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.

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.

Malformed config when saving & loading locally custom models
2 participants