Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/modelscope/modelscope
/ patch_hub
Function
patch_hub
modelscope/utils/hf_util/patcher.py:1002–1005 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
1000
1001
1002
def
patch_hub():
1003
_patch_hub()
1004
_patch_kernels()
1005
_patch_pretrained_class(get_all_imported_modules())
1006
1007
1008
def
unpatch_hub():
Callers
3
test_patch_hub_then_unpatch_hub_round_trip
Method · 0.90
test_wrapped_call_nests_inside_patch_hub
Method · 0.90
patch_context
Function · 0.85
Calls
4
_patch_hub
Function · 0.85
_patch_kernels
Function · 0.85
_patch_pretrained_class
Function · 0.85
get_all_imported_modules
Function · 0.85
Tested by
2
test_patch_hub_then_unpatch_hub_round_trip
Method · 0.72
test_wrapped_call_nests_inside_patch_hub
Method · 0.72
Used in the wild
real call sites across dependent graphs
searching dependent graphs…