_prepare_split will overwrite DatasetBuilder.info.features
MEMBER
Hi ! This might be related to #2153 

You're right the ArrowWriter should be initialized with `features=self.info.features` ! Good catch
I'm opening a PR to fix this and also to figure out how it was not caught in the tests

EDIT: opened #2201
2021-04-09T12:43:59Z
https://github.com/huggingface/datasets/issues/2200#issuecomment-816655374
https://api.github.com/repos/huggingface/datasets/issues/2200
MDEyOklzc3VlQ29tbWVudDgxNjY1NTM3NA==
https://api.github.com/repos/huggingface/datasets/issues/comments/816655374/reactions
2021-04-09T12:57:53Z
https://api.github.com/repos/huggingface/datasets/issues/comments/816655374
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
NONE
> Hi ! This might be related to #2153
> 
> You're right the ArrowWriter should be initialized with `features=self.info.features` ! Good catch
> I'm opening a PR to fix this and also to figure out how it was not caught in the tests
> 
> EDIT: opened #2201

Glad to hear that! Thank you for your fix, I'm new to huggingface, it's a fantastic project 😁
2021-04-10T11:58:42Z
https://github.com/huggingface/datasets/issues/2200#issuecomment-817125478
https://api.github.com/repos/huggingface/datasets/issues/2200
MDEyOklzc3VlQ29tbWVudDgxNzEyNTQ3OA==
https://api.github.com/repos/huggingface/datasets/issues/comments/817125478/reactions
2021-04-10T11:58:42Z
https://api.github.com/repos/huggingface/datasets/issues/comments/817125478
https://avatars.githubusercontent.com/u/4157614?v=4
https://api.github.com/users/Gforky/events{/privacy}
https://api.github.com/users/Gforky/followers
https://api.github.com/users/Gforky/following{/other_user}
https://api.github.com/users/Gforky/gists{/gist_id}
https://github.com/Gforky
Gforky
MDQ6VXNlcjQxNTc2MTQ=
https://api.github.com/users/Gforky/orgs
https://api.github.com/users/Gforky/received_events
https://api.github.com/users/Gforky/repos
https://api.github.com/users/Gforky/starred{/owner}{/repo}
https://api.github.com/users/Gforky/subscriptions
User
https://api.github.com/users/Gforky
public
Hi, here is my issue:
I initialized a Csv datasetbuilder with specific features:
```
def get_dataset_features(data_args):
    features = {}
    if data_args.text_features:
        features.update({text_feature: hf_features.Value("string") for text_feature in data_args.text_features.strip().split(",")})
    if data_args.num_features:
        features.update({text_feature: hf_features.Value("float32") for text_feature in data_args.num_features.strip().split(",")})
    if data_args.label_classes:
        features["label"] = hf_features.ClassLabel(names=data_args.label_classes.strip().split(","))
    else:
        features["label"] = hf_features.Value("float32")
    return hf_features.Features(features)

datasets = load_dataset(extension,
                                data_files=data_files,
                                sep=data_args.delimiter,
                                header=data_args.header,
                                column_names=data_args.column_names.split(",") if data_args.column_names else None,
                                features=get_dataset_features(data_args=data_args))
```
The `features` is printout as below before `builder_instance.as_dataset` is called:
```
{'label': ClassLabel(num_classes=2, names=['unacceptable', 'acceptable'], names_file=None, id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
````

But after the `builder_instance.as_dataset` is called for Csv dataset builder, the `features` is changed to:
```
{'label': Value(dtype='int64', id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
```

After digged into the code, I releazed that in `ArrowBasedBuilder._prepare_split`, the DatasetBuilder's info's features will be overwrited by `ArrowWriter`'s `_features`. 
But `ArrowWriter` is initailized without passing `features`.
So my concern is:
It's this overwrite must be done, or, should it be an option to pass features in `_prepare_split` function?