I am trying to concatenate two datasets
from datasets import load_dataset, concatenate_datasets
movie = load_dataset("movie_rationales")
imdb = load_dataset("imdb")
imdb = imdb['train']
Then I adapt the movie dataset
movie_imdb_format = movie['train'].map(
lambda x: {"text": x["review"]}
)
movie_imdb_format = movie_imdb_format.remove_columns(["review", "evidences"])
and aim to concatenate them
dataset_cc = concatenate_datasets([imdb, movie_imdb_format])
These both datasets output
Dataset({
features: ['text', 'label'],
num_rows: 25000
})
Dataset({
features: ['label', 'text'],
num_rows: 1600
})
However, I get an error
ValueError: The features can't be aligned because the key label of features {'label': ClassLabel(names=['NEG', 'POS'], id=None), 'text': Value(dtype='string', id=None)} has unexpected type - ClassLabel(names=['NEG', 'POS'], id=None) (expected either ClassLabel(names=['neg', 'pos'], id=None) or Value("null").
Any suggestion of why this may be happening and how to solve it?