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

ModelHubMixin overwrite config if preexistant #2142

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Mar 22, 2024

Good catch from @not-lain. If a config file is saved by _save_pretrained, we don't want to overwrite it (done in #2102. But if a config file already exists before saving, we should overwrite it (as any other file). This PR fixes this + adds a test case.

(also removing a warning in a test)

@Wauplin Wauplin requested a review from LysandreJik March 22, 2024 10:51
@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.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.69%. Comparing base (3252e27) to head (e248ada).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2142      +/-   ##
==========================================
- Coverage   82.70%   82.69%   -0.01%     
==========================================
  Files         103      103              
  Lines        9628     9629       +1     
==========================================
  Hits         7963     7963              
- Misses       1665     1666       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Wauplin Wauplin merged commit a42c629 into main Mar 25, 2024
16 checks passed
@Wauplin Wauplin deleted the hub-mixin-overwrite-config-if-preexistant branch March 25, 2024 11:01
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