# Saving custom dataset does not finish

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsaving-custom-dataset-does-not-finish%2F33770%3E%5C
**Category:** 🤗Datasets\
**Created:** [March 14, 2023, 11:45am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsaving-custom-dataset-does-not-finish%2F33770 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FYanaS)%5C
**Post date:** [March 14, 2023, 11:45am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsaving-custom-dataset-does-not-finish%2F33770%2F1 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmariosasko)%5C
**Post date:** [March 15, 2023, 2:51pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsaving-custom-dataset-does-not-finish%2F33770%2F2 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmariosasko)%5C
**Post date:** [March 15, 2023, 3:11pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsaving-custom-dataset-does-not-finish%2F33770%2F3 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FYanaS)%5C
**Post date:** [March 16, 2023, 5:47am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsaving-custom-dataset-does-not-finish%2F33770%2F4 "2023-03-16T05:47:52Z")

</div>

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