bugfix - runtime error "sharding is ambiguous"

#2
by bhigy - opened

When trying to load the dataset with the split "microphone-single", I get following error:

RuntimeError: Sharding is ambiguous for this dataset: we found several data sources lists of different lengths, and we don't know over which list we should parallelize:
        - key samples_paths has length 134
        - key ids has length 136
        - key verification_ids has length 134
To fix this, check the 'gen_kwargs' and make sure to use lists only for data sources, and use tuples otherwise. In the end there should only be one single list, or several lists with the same length.

This is due to ids still containing the missing files for that split.

Legacy Datasets org

Thanks for reporting this issue, @bhigy .

Indeed it seems this is a more general bug that affects multiple datasets. We are investigating it.

I think the solution is pretty obvious here (cf. the fix I pushed).

The fixing solution for this dataset (to circumvent the general issue) was fixed here: https://huggingface.co/datasets/ami/discussions/4/files

  • Your proposed solution was not working for "microphone-multi"

However, as we commented above, the issue is more general and we are investigating a general solution to fix all the affected datasets on the Hub.

Thank you.

albertvillanova changed pull request status to closed

Thanks for the fix!

Legacy Datasets org

We are fixing it in the datasets library. See PR: https://github.com/huggingface/datasets/pull/5416

Sign up or log in to comment