Skip to content

compat modelscope_hub#9760

Merged
Jintao-Huang merged 3 commits into
modelscope:mainfrom
Jintao-Huang:fix_modelscope_hub
Jul 17, 2026
Merged

compat modelscope_hub#9760
Jintao-Huang merged 3 commits into
modelscope:mainfrom
Jintao-Huang:fix_modelscope_hub

Conversation

@Jintao-Huang

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread swift/model/model_meta.py Outdated
@Jintao-Huang

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread swift/model/model_meta.py Outdated
@Jintao-Huang
Jintao-Huang merged commit 3470f9c into modelscope:main Jul 17, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants