# Custom loading dataset script

**URL:** <https://discuss.huggingface.co/t/custom-loading-dataset-script/28400>\
**Category:** 🤗Datasets\
**Created:** [December 25, 2022, 11:24am UTC](https://discuss.huggingface.co/t/custom-loading-dataset-script/28400 "2022-12-25T11:24:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sl02](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sl02](https://discuss.huggingface.co/u/sl02)\
**Post date:** [December 25, 2022, 11:24am UTC](https://discuss.huggingface.co/t/custom-loading-dataset-script/28400/1 "2022-12-25T11:24:50Z")

</div>

I have prepared and tested a custom loading dataset script. Although the test was successful, it hasn’t created the metadata file `dataset_info.json` in my dataset folder. Instead it has created a README.md file. What am I missing here?

Output from the test

```auto
datasets-cli test datasets/tse --save_infos --all_configs
Testing builder 'entity' (1/2)
Downloading and preparing dataset tse/entity to /Users/home/.cache/huggingface/datasets/tse/entity/1.0.0/7f33fefc7622e65f7e037dda1222c13ada1717400eef6ed51970adf336261e21...
Dataset tse downloaded and prepared to /Users/home/.cache/huggingface/datasets/tse/entity/1.0.0/7f33fefc7622e65f7e037dda1222c13ada1717400eef6ed51970adf336261e21. Subsequent calls will reuse this data.                                                      
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 321.33it/s]
Dataset card saved at datasets/tse/README.md
Testing builder 'queries' (2/2)
Downloading and preparing dataset tse/queries to /Users/home/.cache/huggingface/datasets/tse/queries/1.0.0/7f33fefc7622e65f7e037dda1222c13ada1717400eef6ed51970adf336261e21...
Dataset tse downloaded and prepared to /Users/home/.cache/huggingface/datasets/tse/queries/1.0.0/7f33fefc7622e65f7e037dda1222c13ada1717400eef6ed51970adf336261e21. Subsequent calls will reuse this data.
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 25.49it/s]
Dataset card saved at datasets/tse/README.md
Test successful.

```

Directory listing

```auto
(base) home@sls-MacBook-Pro tse % ls -l
total 32
-rw-r--r-- 1 home staff 1311 Dec 25 16:18 README.md
drwxr-xr-x 4 home staff 128 Dec 25 14:20 data
-rw-r--r-- 1 home staff 9500 Dec 25 16:16 tse.py

```

For the final test, why do we need to clone the huggingface/datasets repo to run the following command  
`RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_real_dataset_tse`

Could you please explain?

---

<div class="post-metadata">

**Author:** ![sl02](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sl02](https://discuss.huggingface.co/u/sl02)\
**Post date:** [December 25, 2022, 1:50pm UTC](https://discuss.huggingface.co/t/custom-loading-dataset-script/28400/2 "2022-12-25T13:50:26Z")

</div>

I was looking at the older version of the instructions, here [dataset script](https://huggingface.co/docs/datasets/v2.3.2/en/dataset_script#testing-data-and-checksum-metadata)

Just to be certain, we don’t require a `dataset_info.json` file. Is this correct?

---

<div class="post-metadata">

**Author:** ![sl02](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sl02](https://discuss.huggingface.co/u/sl02)\
**Post date:** [December 25, 2022, 2:06pm UTC](https://discuss.huggingface.co/t/custom-loading-dataset-script/28400/3 "2022-12-25T14:06:03Z")

</div>

Got another query.

How do we pass additional arguments to the `_generate_examples()` method from the `load_dataset()` function?

---

<div class="post-metadata">

**Author:** ![sl02](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sl02](https://discuss.huggingface.co/u/sl02)\
**Post date:** [December 25, 2022, 3:28pm UTC](https://discuss.huggingface.co/t/custom-loading-dataset-script/28400/5 "2022-12-25T15:28:53Z")

</div>

I figured out how to pass additional arguments to the function. Thanks!

If you could answer my earlier question, I would appreciate it.

---

<div class="post-metadata">

**Author:** ![lhoestq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lhoestq/32/52888_2.png) [@lhoestq](https://discuss.huggingface.co/u/lhoestq)\
**Post date:** [January 3, 2023, 11:05am UTC](https://discuss.huggingface.co/t/custom-loading-dataset-script/28400/6 "2023-01-03T11:05:51Z")

</div>

Hi ! We now store the dataset infos into the README.md yaml tags instead of using a JSON file, in order to have everything in one place 🙂
