The dataset viewer doesn't support this dataset because it runs arbitrary python code

#2
by bmarcot - opened
Libertify org

The dataset viewer doesn't support this dataset because it runs arbitrary python code. Please open a discussion in the discussion tab if you think this is an error and tag @lhoestq and @severo .

Not sure about what I am expected to do to get the dataset working with the viewer @lhoestq and @severo ?

Thanks for your input.

Hi! I think you just have to delete the Python script file, and it should work. If you want to configure the split name, or add metadata, please look at the docs at https://huggingface.co/docs/hub/datasets and in particular https://huggingface.co/docs/hub/datasets-manual-configuration

Libertify org

It sounds like it is not possible to view a dataset with a Python loading script, see comment below. What do you think?

https://huggingface.co/datasets/google/fleurs/discussions/22#6576d5f85da75f987f429ce6

Indeed, we have a list of exceptions (it's public: https://github.com/huggingface/datasets-server/blob/main/chart/values.yaml#L87)
We're in the process of reducing the number of exceptions, and try not to add new ones.

As I mentioned, if you just delete the python file, everything should work as expected.

Thanks for your input @severo . I removed the locading script and the dataset shows in the viewer.

However images are showing as bytes, and there are fields I would like to remove from the viewer (namely __index_level_0__). Am I missing a dataset_infos.json? If so, how can I create it automatically?

bmarcot changed discussion status to closed

Sorry for the delay @bmarcot : as you already found out, the key is using the YAML tags in the README file, under dataset_info.

For future cases, once you have created your dataset with a Python loading script, you can automatically convert it to a Parquet no-script dataset by using this Space we have created: https://huggingface.co/spaces/albertvillanova/convert-dataset-to-parquet

Libertify org

@albertvillanova I moved to the more straightforward approach with an imagefolder dataset and push_to_hub() to delegate the parquet conversion to HF.

Sign up or log in to comment