Datasets:
small refactor
Would this cause any issues in generating the splits? I had left the name
kwarg in for that reason
Not in this case, the split is set on this line: https://huggingface.co/datasets/biglam/contentious_contexts/blob/main/contentious_contexts.py#L99.
If you had multiple splits you would usually have more things inside the return statement, i.e. name=datasets.Split.VALID
, the main reason that split is sometimes passed as a kwarg is that the different splits might be processed differently or contains different downloads so if you, for example, had one file downloaded for the training split and another you for the the validation split it's easier to check for that in _generate_examples
. For example, in the GLUE script, the split info is used to determine how some processing steps are done: https://github.com/huggingface/datasets/blob/0c1d099f87a883e52c42d3fd1f1052ad3967e647/datasets/glue/glue.py#L552
Ah, I see. Thanks for the detailed explanation. Merging this