# Load\_dataset assumes 'train'

**URL:** <https://discuss.huggingface.co/t/load-dataset-assumes-train/41537>\
**Category:** Beginners\
**Created:** [May 30, 2023, 8:20pm UTC](https://discuss.huggingface.co/t/load-dataset-assumes-train/41537 "2023-05-30T20:20:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![slyle](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@slyle](https://discuss.huggingface.co/u/slyle)\
**Post date:** [May 30, 2023, 8:20pm UTC](https://discuss.huggingface.co/t/load-dataset-assumes-train/41537/1 "2023-05-30T20:20:47Z")

</div>

This is sort of nitpicky, but when using the following command:

load\_dataset(“audiofolder”, data\_dir=“path/to/data”)

it automatically assumes the resulting Dataset object inside the created DatasetDict is the ‘train’ Dataset, by naming it as such.

Why is this? It feels really awkward to write the following:

dataset = dataset[‘train’].train\_test\_split(test\_size=0.3)

Thanks!

---

<div class="post-metadata">

**Author:** ![mariosasko](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mariosasko/32/31548_2.png) [@mariosasko](https://discuss.huggingface.co/u/mariosasko)\
**Post date:** [May 31, 2023, 12:44pm UTC](https://discuss.huggingface.co/t/load-dataset-assumes-train/41537/2 "2023-05-31T12:44:51Z")

</div>

You can pass `split="train"` to `load_dataset` to get a `Dataset` object.

I agree this is not the best design, so we will eventually start returning the concatenation of all the splits by default (see [Reduce friction in tabular dataset workflow by eliminating having splits when dataset is loaded · Issue #5189 · huggingface/datasets · GitHub](https://github.com/huggingface/datasets/issues/5189)).

---

<div class="post-metadata">

**Author:** ![slyle](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@slyle](https://discuss.huggingface.co/u/slyle)\
**Post date:** [May 31, 2023, 3:53pm UTC](https://discuss.huggingface.co/t/load-dataset-assumes-train/41537/3 "2023-05-31T15:53:00Z")

</div>

Thanks for your time and the tip Mario. I will pass that argument from now on. Good to know I’m not the only one who ran into this 😃
