Natooz / MidiTok

MIDI / symbolic music tokenizers for Deep Learning models 🎶
https://miditok.readthedocs.io/
MIT License
665 stars 81 forks source link

allow _create_durations_tuples to be overriden, and new tokenizer loading logic #152

Closed JLenzy closed 6 months ago

JLenzy commented 6 months ago
  1. Allow _create_durations_tuples function to be overriden, thus allowing for more flexible creation of time events in new tokenization methods
  2. Tokenizer base class can now call _load_params with a dictionary (not just a .json file path). This allows for more fluid integration into model saving/loading functions as it doesn't require a file to be written/read when loading the tokenizer.

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

codecov[bot] commented 6 months ago

Codecov Report

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

Project coverage is 90.85%. Comparing base (a1ce1e7) to head (fd538b4).

Files Patch % Lines
miditok/midi_tokenizer.py 85.71% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #152 +/- ## ========================================== - Coverage 91.18% 90.85% -0.34% ========================================== Files 33 33 Lines 4994 4996 +2 ========================================== - Hits 4554 4539 -15 - Misses 440 457 +17 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.