This case converts a custom dataset into MindSpore Record data format
RuntimeError: Unexpected error. Invalid data, the number of schema should be positive but got: 0. Please check the input schema.
Error message: Invalid data
means invalid data, the type defined for intent_ids
is inconsistent with the actual data type used, resulting in no matching data.
Change intent_label_ids
to the type used for the input data.
Steps to locate the error report:
writer.write_raw_data(data);
"Invalid data, the number of schema should be positive but got: 0. Please check the input schema."
, there may be a problem when locating the data input part. Combined with the previous warning: "for schema, 0 th data is wrong, data type for 'intent_ids' is not matched."
can locate the error when intent_ids
data is written, check and find that intent_ids
is a one-dimensional array , the input is a single data during traversal, and it is defined as a numpy
type in the code, which causes the data to not match the relevant type of data when reading.https://blog.csdn.net/skytttttt9394/article/details/125483276