HuggingFace Integration & Pyproject #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR modernizes the project by transitioning from
setup.pytopyproject.tomlfor configuration, improving compatibility with modern Python packaging standards.The
final0model has also been published on the Hugging Face Hub assafe-models/beat-this-final0, stored in safetensors FP16 format since all tensor values are within range. This optimization reduces the model size by approximately 50%, bringing it down to ~40MB while maintaining performance. Additionally, the download speed is faster now, thanks to Hugging Face's optimized networking.Copilot generated summary:
This pull request includes significant updates to the
beat_thisproject, focusing on enhancing model loading functionality, integrating with the Hugging Face Hub, and transitioning the build system to usepyproject.toml.Model Loading Enhancements:
beat_this/inference.py: Modified theload_modelfunction to handle cases wherecheckpoint_pathisNoneand to useBeatThis.from_pretrainedfor loading pretrained models. [1] [2]Hugging Face Hub Integration:
beat_this/model/beat_tracker.py: AddedPyTorchModelHubMixinto theBeatThisclass to enable integration with the Hugging Face Hub.Build System Transition:
pyproject.toml: Introducedpyproject.tomlfor project configuration, specifying dependencies and build system requirements usinghatchling.setup.py: Removedsetup.pyin favor of usingpyproject.tomlfor project configuration.