Passing schema features to a load_dataset function

Hi.

I am trying to load a loca csv into a Hugging Face dataset, but I have this error. I can’t understand what is wrong. I am using dataset 1.6.2

This is the code:

image

And this is the error I have:

Tha error says `Target schema’s field names are not matching the table’s field names: [‘text’, ‘labels’, ‘offerid’], [‘labels’, ‘offerid’, ‘text’]. It doesn’t make any sense for me, because the fields name matches.

Any help would be welcome.

@Oigres Hi, Probably this link might help you, let me know if you have already tried.

1 Like

I find lot of information about how to work with datasets that come from the hub, like imbd. But, what I don’t find is how to work with your own datasets stored locally. Concretely, I have not seen any example about how to define the data types. In my case, I need to create manually the ClassLabel type, and I don’t find any example about how to do it.

Hi.

I finally found kind of a solution following this thread. Hope it can help others.

Wow, Great, Thanks for posting here

1 Like