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

BaseConfig update for transformers>=4.22.0 #386

Merged

Conversation

michaelbenayoun
Copy link
Member

@michaelbenayoun michaelbenayoun commented Sep 16, 2022

What does this PR do?

This PR updates the BaseConfig class to synchronize with the updates performed on the transformers.PretrainedConfig, and fixes the issue induced by the transformers 4.22 release, breaking the current BaseConfig.push_to_hub method.

@michaelbenayoun michaelbenayoun changed the title Fix base config push to hub BaseConfig update for transformers>=4.22,0 Sep 16, 2022
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 16, 2022

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


# That config file may point us toward another config file to use.
if "configuration_files" in config_dict:
configuration_file = cls.get_configuration_file(config_dict["configuration_files"])
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should call cls.get_configuration_file here (see), so you shouldn't remove get_config_dict()

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right, thanks!

@michaelbenayoun michaelbenayoun changed the title BaseConfig update for transformers>=4.22,0 BaseConfig update for transformers>=4.22.0 Sep 16, 2022
setup.py Outdated Show resolved Hide resolved
Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
Copy link
Collaborator

@echarlaix echarlaix left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for taking care of this @michaelbenayoun

@michaelbenayoun michaelbenayoun merged commit adf37aa into huggingface:main Sep 22, 2022
@michaelbenayoun michaelbenayoun deleted the fix_base_config_push_to_hub branch September 22, 2022 14:32
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