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

Fixing save_pretrained to comply with huggingface_hub v0.21 #150

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

Natooz
Copy link
Owner

@Natooz Natooz commented Mar 8, 2024

Since huggingface_hub v0.21 ModelHubMixin.save_pretrained will automatically save self.config after calling self._save_pretrained, which is unnecessary in our case as self._save_pretrained already saves the tokenizer's config.

This PR overrides ModelHubMixin.save_pretrained to get rid of the config logic.


📚 Documentation preview 📚: https://miditok--150.org.readthedocs.build/en/150/

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

Attention: Patch coverage is 63.63636% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 91.02%. Comparing base (18a6b3a) to head (3ca4190).
Report is 1 commits behind head on main.

Files Patch % Lines
miditok/midi_tokenizer.py 60.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #150      +/-   ##
==========================================
- Coverage   91.15%   91.02%   -0.13%     
==========================================
  Files          33       33              
  Lines        4984     4994      +10     
==========================================
+ Hits         4543     4546       +3     
- Misses        441      448       +7     

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

@Natooz Natooz merged commit 7fe2e15 into main Mar 8, 2024
14 checks passed
@Natooz Natooz deleted the fix-hf-save-pretrained branch March 8, 2024 17:26
Natooz added a commit that referenced this pull request Mar 18, 2024
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.

None yet

1 participant