mirror of
https://github.com/modelscope/modelscope.git
synced 2026-05-18 05:05:00 +02:00
fix (#1708)
This commit is contained in:
@@ -524,6 +524,7 @@ def _patch_kernels():
|
||||
"""
|
||||
try:
|
||||
from kernels import utils as kernels_utils
|
||||
from kernels.utils import _get_hf_api
|
||||
except ImportError:
|
||||
return
|
||||
if hasattr(kernels_utils, '_get_hf_api_origin'):
|
||||
@@ -535,6 +536,7 @@ def _patch_kernels():
|
||||
def _unpatch_kernels():
|
||||
try:
|
||||
from kernels import utils as kernels_utils
|
||||
from kernels.utils import _get_hf_api
|
||||
except ImportError:
|
||||
return
|
||||
origin = getattr(kernels_utils, '_get_hf_api_origin', None)
|
||||
|
||||
Reference in New Issue
Block a user