Hi,
Iām experimenting with the emotion dataset from manually downloaded files.
from datasets import load_dataset
dataset = load_dataset('csv', data_files={'train': 'train.txt', 'validation': 'val.txt', 'test': 'test.txt'}, sep=";",
names=["text", "label"])
dataset.cast_column("label", ClassLabel(names = ['anger', 'fear', 'joy', 'love', 'sadness', 'surprise'] ))
Iām getting āArrowInvalid: Failed to parse string: āangerā as a scalar of type int64ā error, even after specifying anger
as label in the names
list
Thanks for your suggestion class_encode_column
, it worked.
Any idea why cast_column isnāt working in this case?