FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix rename_mapping in download_huggingface_model (change arg type str -> dict) by deruyter92 · Pull Request #3196 · DeepLabCut/DeepLabCut · GitHub

fix rename_mapping in download_huggingface_model (change arg type str -> dict) - #3196

Merged
C-Achard merged 1 commit into
mainfrom
jaap/bugfix_rename_mapping_download_huggingface
Feb 13, 2026
Merged

fix rename_mapping in download_huggingface_model (change arg type str -> dict)#3196
C-Achard merged 1 commit into
mainfrom
jaap/bugfix_rename_mapping_download_huggingface

Conversation

deruyter92 commented Feb 2, 2026
edited
Loading

Copy link
Copy Markdown
Collaborator

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.

deruyter92 marked this pull request as ready for review February 2, 2026 13:47
deruyter92 mentioned this pull request Feb 3, 2026
2 tasks
deruyter92 requested a review from MMathisLab February 4, 2026 15:57
deruyter92 added the bug fix! fix for a real buggy one... label Feb 4, 2026

Copy link
Copy Markdown
Collaborator Author

@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.

C-Achard merged commit 0641392 into main Feb 13, 2026
11 checks passed
C-Achard deleted the jaap/bugfix_rename_mapping_download_huggingface branch February 13, 2026 14:43
C-Achard linked an issue Feb 13, 2026 that may be closed by this pull request
2 tasks
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

Labels

bug fix! fix for a real buggy one...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Training dataset creation failed

2 participants


Back | FazBrowse Home | New Git URL