# Dataset creation template

**URL:** <https://discuss.huggingface.co/t/dataset-creation-template/52446>\
**Category:** 🤗Datasets\
**Created:** [August 28, 2023, 8:31am UTC](https://discuss.huggingface.co/t/dataset-creation-template/52446 "2023-08-28T08:31:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimvu](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kimvu](https://discuss.huggingface.co/u/kimvu)\
**Post date:** [August 28, 2023, 8:31am UTC](https://discuss.huggingface.co/t/dataset-creation-template/52446/1 "2023-08-28T08:31:23Z")

</div>

Hi, I have created a Dataset using the script [https://github.com/huggingface/datasets/blob/2.14.4/templates/new\_dataset\_script.py](https://github.com/huggingface/datasets/blob/2.14.4/templates/new_dataset_script.py) to upload to the hub, yet cannot figure out how to create it from Builder class(e.g. calling NewDataset()). I adapted this after reviewing some Dataset creation script from other benchmarks (e.g. [ceval-exam.py · ceval/ceval-exam at main](https://huggingface.co/datasets/ceval/ceval-exam/blob/main/ceval-exam.py)), but don’t know how to proceed next. Thank you.

---

<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:** [August 28, 2023, 10:51pm UTC](https://discuss.huggingface.co/t/dataset-creation-template/52446/2 "2023-08-28T22:51:27Z")

</div>

`datasets.load_dataset("user/dataset_name")` (or `datasets.load_dataset("path/to/local/folder")` for local dataset) is how you load a dataset.

If the dataset in question is hosted on the Hub and public, feel free to link it so we can provide more info on how to load/fix it 🙂.

---

<div class="post-metadata">

**Author:** ![kimvu](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kimvu](https://discuss.huggingface.co/u/kimvu)\
**Post date:** [August 28, 2023, 11:33pm UTC](https://discuss.huggingface.co/t/dataset-creation-template/52446/3 "2023-08-28T23:33:53Z")

</div>

Hi, thank you for your answer. I actually intend to create and share a new dataset into the hub through the above script (GeneratorBasedBuilder class). Yet, after constructing the class, I wasn’t able to initialize or use it.

---

<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:** [August 29, 2023, 12:05am UTC](https://discuss.huggingface.co/t/dataset-creation-template/52446/4 "2023-08-29T00:05:29Z")

</div>

> after constructing the class, I wasn’t able to initialize or use it.

What do you mean by that? You should use `load_dataset("path/to/folder_with_script")` (or directly pass a path to the script) to build a dataset from a loading script.
