# Saving custom dataset does not finish

**URL:** <https://discuss.huggingface.co/t/saving-custom-dataset-does-not-finish/33770>\
**Category:** 🤗Datasets\
**Created:** [March 14, 2023, 11:45am UTC](https://discuss.huggingface.co/t/saving-custom-dataset-does-not-finish/33770 "2023-03-14T11:45:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![YanaS](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@YanaS](https://discuss.huggingface.co/u/YanaS)\
**Post date:** [March 14, 2023, 11:45am UTC](https://discuss.huggingface.co/t/saving-custom-dataset-does-not-finish/33770/1 "2023-03-14T11:45:41Z")

</div>

![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/8/8b30e2b8c4fabe312d76c88a5cb768513c50a10d.png)  
I create my custom dataset to train Donut and want to save it to disk:

> dataset.save\_to\_disk(“/content/drive/MyDrive/image-dataset/huggingface-dataset”)

This is the structure of the dataset:

DatasetDict({  
train: Dataset({  
features: [‘image’, ‘id’, ‘ground\_truth’],  
num\_rows: 528  
})  
test: Dataset({  
features: [‘image’, ‘id’, ‘ground\_truth’],  
num\_rows: 133  
})  
})

---

<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:** [March 15, 2023, 2:51pm UTC](https://discuss.huggingface.co/t/saving-custom-dataset-does-not-finish/33770/2 "2023-03-15T14:51:38Z")

</div>

Hi! Can you interrupt the process while it hangs and paste the error traceback here?

---

<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:** [March 15, 2023, 3:11pm UTC](https://discuss.huggingface.co/t/saving-custom-dataset-does-not-finish/33770/3 "2023-03-15T15:11:06Z")

</div>

Hi! ~~Can you interrupt the process while it hangs and paste the error traceback here?~~

This behavior is due to a bug in `save_to_disk` where we skip the last progress bar update. However, this bug doesn’t affect the actual saving of a dataset to disk - this can verified by reloading the saved dataset with `load_from_disk`.

PS: You can get a proper output by updating `datasets` to the latest release.

---

<div class="post-metadata">

**Author:** ![YanaS](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@YanaS](https://discuss.huggingface.co/u/YanaS)\
**Post date:** [March 16, 2023, 5:47am UTC](https://discuss.huggingface.co/t/saving-custom-dataset-does-not-finish/33770/4 "2023-03-16T05:47:52Z")

</div>

Thank you. Yes it seems that everything is fine after loading the saved dataset.
