Skip to content

Fix bug: 1. patch_context cannot revert classmethod 2. kernels testcase miss trust_remote_code and revision#1729

Merged
tastelikefeet merged 4 commits into
modelscope:masterfrom
tastelikefeet:fix/0531-1
May 31, 2026
Merged

Fix bug: 1. patch_context cannot revert classmethod 2. kernels testcase miss trust_remote_code and revision#1729
tastelikefeet merged 4 commits into
modelscope:masterfrom
tastelikefeet:fix/0531-1

Conversation

@tastelikefeet

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 introduces support for a new repository type, REPO_TYPE_KERNEL, across the download utilities and constants, and refactors the unpatching logic in patcher.py to correctly restore patched methods as classmethods. The review feedback highlights critical missing updates for REPO_TYPE_KERNEL in file_download.py and snapshot_download.py that could cause runtime failures during kernel downloads. Additionally, it recommends updating an outdated error message and replacing a bare except: clause with a specific AttributeError exception handler in patcher.py.

Comment thread modelscope/hub/file_download.py Outdated
Comment thread modelscope/hub/snapshot_download.py Outdated
Comment thread modelscope/utils/hf_util/patcher.py
Comment thread modelscope/utils/constant.py Outdated
@tastelikefeet tastelikefeet merged commit 8bab4b9 into modelscope:master May 31, 2026
1 of 2 checks passed
@tastelikefeet tastelikefeet deleted the fix/0531-1 branch May 31, 2026 08:11
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