Dataset Viewer issue

#1
by MightyStudent - opened

The dataset viewer is not working.

Error details:

Server error while post-processing the split rows. Please report the issue.

Error code:   TransformRowsProcessingError

cc @albertvillanova @lhoestq @severo .

Hello!

Even when I tried to use it via the datasets library:

from datasets import load_dataset

dataset = load_dataset("MightyStudent/Egyptian-ASR-MGB-3")

I got this error:

DatasetGenerationError: An error occurred while generating the dataset

I think this might be related to the structure of uploaded files.

Here is a minimal example of creating an audio dataset:

from datasets import Dataset, Audio

audio_dataset  = Dataset.from_dict({"audio": audio_files, "sentence": audio_texts}).cast_column("audio", Audio())

In this example, the dictionary {"audio": audio_files, "sentence": audio_texts} includes two items "audio": audio_files where audio_files is a list of the local paths to the audio files, and "sentence": audio_texts where audio_texts is a list of transcripts. Finally, cast_column("audio", Audio() converts each audio file to a representative array.

The error says:

{
  "error": "Server error while post-processing the split rows. Please report the issue.",
  "cause_exception": "TypeError",
  "cause_message": "dict cell must be a dict.",
  "cause_traceback": [
    "Traceback (most recent call last):\n",
    " File \"/src/libs/libcommon/src/libcommon/viewer_utils/rows.py\", line 143, in create_first_rows_response\n transformed_rows = transform_rows(\n",
    " File \"/src/libs/libcommon/src/libcommon/viewer_utils/rows.py\", line 30, in transform_rows\n return [\n",
    " File \"/src/libs/libcommon/src/libcommon/viewer_utils/rows.py\", line 31, in <listcomp>\n {\n",
    " File \"/src/libs/libcommon/src/libcommon/viewer_utils/rows.py\", line 32, in <dictcomp>\n featureName: get_cell_value(\n",
    " File \"/src/libs/libcommon/src/libcommon/viewer_utils/features.py\", line 304, in get_cell_value\n raise TypeError(\"dict cell must be a dict.\")\n",
    "TypeError: dict cell must be a dict.\n"
  ]
}

I think it's a mismatch between the metadata in the README YAML:

dataset_info:
  features:
    - name: audio
      dtype:
        audio:
          sampling_rate: 16000
    - name: sentence

and the contents of the parquet files.

cc @lhoestq @mariosasko

I believe you are right, I manually created the README YAML part without really knowing the structure of it, I copied the YAML file from similar datasets. I'd like to know more how to automatically or manually write it in the correct form.

If that's not the case I'll try re-uploading it. I honestly don't remember the options I used while uploading, might missed something there.
Thanks

Sign up or log in to comment