| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@MMathisLab, it would be great to merge this to fix a small bug in download_huggingface_model when it is used with older versions of dlclibrary. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Solves #3192
Issue
When downloading a model from huggingface for superanimal weight initialization, download_huggingface_model is called with argument rename_mapping=model_filename. Newer dlclibrary (version =>0.0.9, see DeepLabCut/DLClibrary@0ce7473) can convert this string argument to a dict, but older versions expect a dict argument. Running the current code in DeepLabCut with an older dlclibrary installation will raise AttributeError: 'str' object has no attribute 'get'.
Changes
This PR replaces the str-type argument rename_mapping=model_filename with a dictionary: rename_mapping={model_filename:model_filename}, so that it works both with older and newer dlclibrary versions.