By taking a look at the datasets features’ structure, I see a notable difference between the one that appears in the example notebook (which is lodaded from the Hugging Face repository):
{'attention_mask': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None),
 'input_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None),
 'label': ClassLabel(num_classes=2, names=['neg', 'pos'], names_file=None, id=None),
 'text': Value(dtype='string', id=None),
 'token_type_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None)}

And the one I load from my CSV file:
{'attention_mask': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None),
 'input_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None),
 'label': Value(dtype='string', id=None),
 'token_type_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None),
 'tweet': Value(dtype='string', id=None)}

Basically, the main difference is that the label feature has a ClassLabel type, while mine is just Value. Plus, I am having an extra feature, token_type_ids, which does not appear in the example’s dataset. However, I think that the real problem that triggers the error is the fact that my label is not of the proper type, so how can I specify that the label feature is my classes’ label? It seems that I need to pass a features argument to nlp.load_dataset(), but I could not find any example of how to do it.