# Datasets.load\_dataset not returning 'eval' or 'test'

**URL:** <https://discuss.huggingface.co/t/datasets-load-dataset-not-returning-eval-or-test/18000>\
**Category:** 🤗Datasets\
**Created:** [May 16, 2022, 12:32pm UTC](https://discuss.huggingface.co/t/datasets-load-dataset-not-returning-eval-or-test/18000 "2022-05-16T12:32:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![petarulev](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@petarulev](https://discuss.huggingface.co/u/petarulev)\
**Post date:** [May 16, 2022, 12:32pm UTC](https://discuss.huggingface.co/t/datasets-load-dataset-not-returning-eval-or-test/18000/1 "2022-05-16T12:32:44Z")

</div>

I am using load\_dataset to load my data which is basically files stored in a directory:

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/b/bf43cba945cfa7444174d8bc7d1ed139f6f08c1a.png)

I load the data with:  
`dataset = load_dataset(path='/Users/petar/Documents/bert/data', split='train')`

Basically, only “train” split is available and my data is stored there. I also would like to get a eval or test split so I can do “per\_device\_eval\_batch\_size” in TrainingArguments. How can I make that split and specify split size?

---

<div class="post-metadata">

**Author:** ![stevhliu](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/stevhliu/32/18373_2.png) [@stevhliu](https://discuss.huggingface.co/u/stevhliu)\
**Post date:** [May 16, 2022, 4:59pm UTC](https://discuss.huggingface.co/t/datasets-load-dataset-not-returning-eval-or-test/18000/2 "2022-05-16T16:59:19Z")

</div>

Hi @petarulev ! You can use Datasets `train_test_split` function to create and adjust the size of each split:

```nohighlight
dataset.train_test_split(test_size=0.2)

```

Check out the docs [here](https://huggingface.co/docs/datasets/process#split) 🙂

---

<div class="post-metadata">

**Author:** ![petarulev](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@petarulev](https://discuss.huggingface.co/u/petarulev)\
**Post date:** [May 17, 2022, 7:02am UTC](https://discuss.huggingface.co/t/datasets-load-dataset-not-returning-eval-or-test/18000/3 "2022-05-17T07:02:46Z")

</div>

Thank you! 🙂
