refactor: replace the deprecated ModelFilter with dict-based filters for hugging_face compatibility - #32
Open
lokeshllkumar wants to merge 1 commit into
Conversation
…for latest huggingface_hub compatibility The change removes the use of huggingface_hub's now deprecated ModelFilter class in the hf_io_mixin.py file. It replaces the construction of the model filter and its usage with a new dictionary-based approach compatible with huggingface_hub==0.33.1 (the latest version at the time of this commit). - get_hf_model_filter() now returns a filter dict - search_huggingface_models() accepts a dict or a list of dicts - Support for metadata keys and filter parameters is preserved - Ensures that 'nemo' is enforced into the library filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The change removes the use of the now deprecated
ModelFilterclass from thehuggingface_hubpackage in thenemo/core/classes/mixins/hf_io_mixin.pyfile. It replaces the construction of the model filter and its usage with a new dictionary-based approach compatible with huggingface_hub==0.33.1 (the latest version at the time of this commit). The changes made are listed as follows:What does this PR do ?
Fixes a critical dependency issue caused by usage of a now deprecated class
ModelFilterfrom thehuggingface_hubpackage, used innemo/core/classes/mixins/hf_io_mixin.py.Additional Information