Error when trying to interleave datasets as shown in the docs, features can't be aligned

#14
by rufex2001 - opened

Hi,

When trying to interleave a few of the language subsets of the datasets (specifically: english, russian, chinese, hindi, spanish and arabic) as shown in the docs, i.e. interleaved = interleave_datasets([list_of_datasets]), I get the following error:

ValueError: The features can't be aligned because the key timestamp of features {'text': Value(dtype='string', id=None), 'timestamp': Value(dtype='timestamp[us]', id=None), 'url': Value(dtype='string', id=None)} has unexpected type - Value(dtype='timestamp[us]', id=None) (expected either Value(dtype='string', id=None) or Value("null").

The message is clear. The features in the datasets need to either have the same type (see here), or one of them has to be Null, but this isn't the case, at least in the languages I am trying to interleave. Is this difference of types of features intended? And is there any workaround suggested around this? Sadly, interleave_datasets does not allow to provide features directly.

Thanks!

Sign up or log in to comment