开发者社区 > ModelScope模型即服务 > 正文

modelscope版本好像有点问题,回退到了1.13.2版本和1.14.0执行?

"modelscope版本好像有点问题,回退到了1.13.2版本和1.14.0执行?
from modelscope.msdatasets import MsDataset
ds = MsDataset.load('izhx404/toy_msra', subset_name='adaseq', split='train' ,cache_dir=""/home/adaseq/data"")
都会报:
2024-05-13 16:10:40,531 - modelscope - INFO - PyTorch version 2.3.0 Found.
2024-05-13 16:10:40,532 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer
2024-05-13 16:10:40,532 - modelscope - INFO - No valid ast index found from /root/.cache/modelscope/ast_indexer, generating ast index from prebuilt!
Traceback (most recent call last):
File ""downs.py"", line 12, in
from modelscope.msdatasets import MsDataset
File ""/h/envs/madaseq/lib/python3.8/site-packages/modelscope/init.py"", line 4, in
from modelscope.utils.import_utils import LazyImportModule
File ""/h/envs/madaseq/lib/python3.8/site-packages/modelscope/utils/init.py"", line 1, in
from .hub import create_model_if_not_exist, read_config
File ""/h/envs/madaseq/lib/python3.8/site-packages/modelscope/utils/hub.py"", line 12, in
from modelscope.utils.config import Config
File ""/h/envs/madaseq/lib/python3.8/site-packages/modelscope/utils/config.py"", line 22, in
from modelscope.utils.import_utils import import_modules_from_file
File ""/h/envs/madaseq/lib/python3.8/site-packages/modelscope/utils/import_utils.py"", line 380, in
class LazyImportModule(ModuleType):
File ""/h/envs/madaseq/lib/python3.8/site-packages/modelscope/utils/import_utils.py"", line 383, in LazyImportModule
AST_INDEX = load_index()
File ""/h/envs/madaseq/lib/python3.8/site-packages/modelscope/utils/ast_utils.py"", line 713, in load_index
index = load_from_prebuilt()
File ""/h/envs/madaseq/lib/python3.8/site-packages/modelscope/utils/ast_utils.py"", line 737, in load_from_prebuilt
index = _load_index(file_path, with_template=True)
File ""/h/envs/madaseq/lib/python3.8/site-packages/modelscope/utils/ast_utils.py"", line 600, in _load_index
wrapped_index = json.loads(bytes_index)
File ""/h/envs/madaseq/lib/python3.8/json/init.py"", line 357, in loads
return _default_decoder.decode(s)
File ""/h/envs/madaseq/lib/python3.8/json/decoder.py"", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File ""/h/envs/madaseq/lib/python3.8/json/decoder.py"", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 1 column 85 (char 84)"

展开
收起
小小爱吃香菜 2024-05-21 20:54:35 54 0
1 条回答
写回答
取消 提交回答
  • 您去掉cache_dir试试。 此回答整理自钉钉群“魔搭ModelScope开发者联盟群 ①”

    2024-05-22 09:17:49
    赞同 展开评论 打赏

ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352

相关电子书

更多
视觉AI能力的开放现状及ModelScope实战 立即下载
ModelScope助力语音AI模型创新与应用 立即下载
低代码开发师(初级)实战教程 立即下载