开发者社区 > ModelScope模型即服务 > 计算机视觉 > 正文

在ModelScope中, 读取数据报错,能看下缺少什么吗?

在ModelScope中, 读取数据报错,能看下缺少什么吗? 023-09-12 15:05:05,374 - modelscope - INFO - Loading ast index from C:\Users\12697.cache\modelscope\ast_indexer
2023-09-12 15:05:05,490 - modelscope - INFO - Loading done! Current index file version is 1.9.0, with md5 e0b0904984be055cd20904a7fa7ed7e8 and a total number of 921 components indexed
C:\Users\12697\AppData\Roaming\Python\Python39\site-packages\datasets\load.py:1748: FutureWarning: 'ignore_verifications' was deprecated in favor of 'verification_mode' in version 2.9.1 and will be removed in 3.0.0.
You can remove this warning by passing 'verification_mode=no_checks' instead.
warnings.warn(
线程 0x2 已退出,返回值为 0 (0x0)。
Downloading and preparing dataset csv/default to C:/Users/12697/.cache/modelscope/hub/datasets/csv/default-4e4aa5f3c1e6b2a6/0.0.0/eea64c71ca8b46dd3f537ed218fc9bf495d5707789152eb2764f5c78fa66d59d...

Downloading data files: 0%| | 0/1 [00:00<?, ?it/s]
Downloading data files: 100%|██████████| 1/1 [00:00<00:00, 1001.51it/s]

Extracting data files: 0%| | 0/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 334.26it/s]

Generating train split: 0 examples [00:00, ? examples/s]

An error occurred while generating the dataset
堆栈跟踪:

ValueError: Couldn't cast

Microsoft Excel3.1: null
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 715
to
{'': Value(dtype='null', id=None)}
because column names don't match

The above exception was the direct cause of the following exception:

File "D:\HJml\ES\ImageCaption\ImageCaption.py", line 11, in (Current frame)
ds_train = MsDataset.load('D://HJml//ES//data//train.csv')
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset

展开
收起
LLLA 2023-09-19 21:32:17 235 0
1 条回答
写回答
取消 提交回答
  • 根据您提供的日志信息,出现了一个数据集生成错误的异常。具体的错误信息如下:
    ```ValueError: Couldn't cast Microsoft Excel3.1: null -- schema metadata -- pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 715 to {'': Value(dtype='null', id=None)} because column names don't match

    ```
    根据错误信息,推测可能是数据集中的列名与预期的列名不匹配导致的错误。

    请确保您的数据集文件(train.csv)的列名与预期的列名匹配。检查列名是否正确拼写,并与模型期望的列名一致。如果列名不匹配,您需要调整数据集文件的列名。

    另外,如果您使用的是Excel文件作为数据集,请确保将其转换为CSV格式,并检查CSV文件的列名是否正确。

    如果您已经确认列名匹配且问题仍然存在,请提供更多关于数据集文件的信息,例如文件的示例内容或更详细的数据集结构,以便我能够提供更准确的帮助。

    2023-09-27 13:53:17
    赞同 展开评论 打赏

包含图像分类、图像生成、人体人脸识别、动作识别、目标分割、视频生成、卡通画、视觉评价、三维视觉等多个领域

相关电子书

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