在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 matchThe 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
根据您提供的日志信息,出现了一个数据集生成错误的异常。具体的错误信息如下:
```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文件的列名是否正确。
如果您已经确认列名匹配且问题仍然存在,请提供更多关于数据集文件的信息,例如文件的示例内容或更详细的数据集结构,以便我能够提供更准确的帮助。