Using a dataset for a use other than it was intended for.
Opened by surya-narayanan (closed)

### Describe the bug

Hi, I want to use the rotten tomatoes dataset but for a task other than classification, but when I interleave the dataset, it throws ```'ValueError: Column label is not present in features.'```. It seems that the label_col must be there in the dataset for some reason? 

Here is the full stacktrace

```
  File "/home/suryahari/Vornoi/tryage-handoff-other-datasets.py", line 276, in create_dataloaders                                                                                                    
    dataset = interleave_datasets(dsfold, stopping_strategy="all_exhausted")                                                                                                                         
  File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/combine.py", line 134, in interleave_datasets                                                                   
    return _interleave_iterable_datasets(                                                                                                                                                            
  File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1833, in _interleave_iterable_datasets                                               
    info = DatasetInfo.from_merge([d.info for d in datasets])                                                                                                                                        
  File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 275, in from_merge                                                                               
    dataset_infos = [dset_info.copy() for dset_info in dataset_infos if dset_info is not None]                                                                                                       
  File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 275, in <listcomp>                                                                               
    dataset_infos = [dset_info.copy() for dset_info in dataset_infos if dset_info is not None]                                                                                                       
  File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 378, in copy                                                                                     
    return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()})                                                                                                                 
  File "<string>", line 20, in __init__                                                                                                                                                              
  File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 208, in __post_init__                                                                            
    self.task_templates = [                                                                                                                                                                          
  File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 209, in <listcomp>                                                                               
    template.align_with_features(self.features) for template in (self.task_templates)                                                                                                                
  File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/tasks/text_classification.py", line 20, in align_with_features                                                  
    raise ValueError(f"Column {self.label_column} is not present in features.")                                                                                                                      
ValueError: Column label is not present in features.    
```

### Steps to reproduce the bug

Delete the column `labels` from the `rotten_tomatoes` dataset. Try to interleave it with other datasets.

### Expected behavior

Should let me use the dataset with just the `text` field

### Environment info

latest datasets library? I don't think this was an issue in earlier versions.

Comments:
I've opened a PR with a fix. In the meantime, you can avoid the error by deleting `task_templates` with `dataset.info.task_templates = None` before the `interleave_datasets` call.
`