TypeError: Couldn't cast array of type

#1
by shizhediao2 - opened

Hi,

When I ran the following command to download the dataset from hugginigface hub, I encountered an error:

My command:

from datasets import load_dataset

ds = load_dataset("mlfoundations/dclm-pool-400m-1x")

The error:

File /lustre/fsw/portfolios/table.py:2122, in cast_array_to_feature(array, feature, allow_primitive_to_str, allow_decimal_to_str)
   2116     return array_cast(
   2117         array,
   2118         feature(),
   2119         allow_primitive_to_str=allow_primitive_to_str,
   2120         allow_decimal_to_str=allow_decimal_to_str,
   2121     )
-> 2122 raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}")

TypeError: Couldn't cast array of type
struct<WARC-Type: string, WARC-Date: timestamp[s], WARC-Record-ID: string, Content-Length: string, Content-Type: string, WARC-Warcinfo-ID: string, WARC-Concurrent-To: string, WARC-IP-Address: string, WARC-Target-URI: string, WARC-Payload-Digest: string, WARC-Block-Digest: string, WARC-Identified-Payload-Type: string>
to
{'WARC-Type': Value(dtype='string', id=None), 'WARC-Date': Value(dtype='timestamp[s]', id=None), 'WARC-Record-ID': Value(dtype='string', id=None), 'Content-Length': Value(dtype='string', id=None), 'Content-Type': Value(dtype='string', id=None), 'WARC-Warcinfo-ID': Value(dtype='string', id=None), 'WARC-Concurrent-To': Value(dtype='string', id=None), 'WARC-IP-Address': Value(dtype='string', id=None), 'WARC-Target-URI': Value(dtype='string', id=None), 'WARC-Payload-Digest': Value(dtype='string', id=None), 'WARC-Block-Digest': Value(dtype='string', id=None), 'WARC-Identified-Payload-Type': Value(dtype='string', id=None), 'WARC-Truncated': Value(dtype='string', id=None)}

The above exception was the direct cause of the following exception:

Could you help take a look? Thanks!

ML Foundations org

Hi @shizhediao2 ,

Let's move the discussion on this topic to Github: https://github.com/mlfoundations/dclm/issues/66

gsmyrnis changed discussion status to closed

Sign up or log in to comment