Dataset Viewer issue: DatasetWithScriptNotSupportedError

#1
by ivanzhouyq - opened

The dataset viewer is not working. It was working before.

Error details:

Error code:   DatasetWithScriptNotSupportedError

cc @albertvillanova @lhoestq @severo .

Hi, indeed, we had to remove support for script-based datasets, for security reasons. This dataset doesn't need the script anyway. Simply removing the file should make the dataset viewer work. Look at the configuration docs if you want more control: https://huggingface.co/docs/hub/datasets-data-files-configuration

Thanks for your response @severo
The dataset needs the python script to iterate through each jsonl and format the output, so the python file is needed. I tried removing the python file, it won't load the dataset and the dataset viewer doesn't work.

Indeed. In this case, you could push your dataset as parquet files with:

import datasets as ds
import huggingface_hub
huggingface_hub.login()
d = ds.load_dataset("ivanzhouyq/RedPajama-Tiny")
d.push_to_hub("ivanzhouyq/RedPajama-Tiny")

Then removing the script (or moving it + the original files to a different branch, such as script).

See https://huggingface.co/datasets/severo/RedPajama-Tiny

It works out greatly. Thank you, @severo !

ivanzhouyq changed discussion status to closed

Sign up or log in to comment