compat modelscope_hub#9760
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds compatibility for ModelScope Hub paths when extracting model names in swift/model/model_meta.py. The reviewer suggested normalizing path separators to forward slashes to ensure cross-platform compatibility on Windows systems, where backslashes are used.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates get_model_name in swift/model/model_meta.py to handle Windows path separators at the beginning of the function and adds compatibility for ModelScope hub cache paths. The review feedback points out that the regular expressions for matching Hugging Face and ModelScope hub cache paths assume an author prefix is always present. If a model lacks an author prefix, the regex fails, and the function incorrectly returns the snapshot revision hash. A suggestion is provided to make the author prefix optional in the regex.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
No description provided.