# PushToHubCallback not uploading the model on huggingface automatically

**URL:** <https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748>\
**Category:** 🤗Transformers\
**Created:** [May 10, 2022, 3:55am UTC](https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748 "2022-05-10T03:55:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanichandna](https://avatars.discourse-cdn.com/v4/letter/v/dc4da7/32.png) [@vanichandna](https://discuss.huggingface.co/u/vanichandna)\
**Post date:** [May 10, 2022, 3:55am UTC](https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748/1 "2022-05-10T03:55:21Z")

</div>

I followed course on [Question answering - Hugging Face Course](https://huggingface.co/course/chapter7/7?fw=tf) and even though it creates a folder in huggingface but the upload is not happening. Please not i logged in using “write API token”

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

---

<div class="post-metadata">

**Author:** ![vanichandna](https://avatars.discourse-cdn.com/v4/letter/v/dc4da7/32.png) [@vanichandna](https://discuss.huggingface.co/u/vanichandna)\
**Post date:** [May 10, 2022, 4:00am UTC](https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748/2 "2022-05-10T04:00:14Z")

</div>

No update on the huggingface page though

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

---

<div class="post-metadata">

**Author:** ![merve](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/merve/32/49809_2.png) [@merve](https://discuss.huggingface.co/u/merve)\
**Post date:** [May 10, 2022, 11:20am UTC](https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748/3 "2022-05-10T11:20:49Z")

</div>

AFAIK this should’ve been fixed. Will try to reproduce your error 🙂

---

<div class="post-metadata">

**Author:** ![vanichandna](https://avatars.discourse-cdn.com/v4/letter/v/dc4da7/32.png) [@vanichandna](https://discuss.huggingface.co/u/vanichandna)\
**Post date:** [May 10, 2022, 11:24am UTC](https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748/4 "2022-05-10T11:24:46Z")

</div>

its getting stored locally… under the name of the folder supplied in currect directory

---

<div class="post-metadata">

**Author:** ![merve](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/merve/32/49809_2.png) [@merve](https://discuss.huggingface.co/u/merve)\
**Post date:** [May 10, 2022, 11:41am UTC](https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748/5 "2022-05-10T11:41:20Z")

</div>

It’s normal that it’s stored locally, what callback does is that after every step/epoch it saves and pushes your model asynchronously, the pushing part here is apparently not working. Your internet might be the cause, the model size might be another reason, or something might be up (which I’m currently checking 👀 )  
A temporary fix is that after your model is trained you can just push the model itself with git-lfs.

---

<div class="post-metadata">

**Author:** ![vanichandna](https://avatars.discourse-cdn.com/v4/letter/v/dc4da7/32.png) [@vanichandna](https://discuss.huggingface.co/u/vanichandna)\
**Post date:** [May 10, 2022, 1:18pm UTC](https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748/6 "2022-05-10T13:18:24Z")

</div>

pls share a link for this… i have tried a few and they dont work on colab

---

<div class="post-metadata">

**Author:** ![vanichandna](https://avatars.discourse-cdn.com/v4/letter/v/dc4da7/32.png) [@vanichandna](https://discuss.huggingface.co/u/vanichandna)\
**Post date:** [May 11, 2022, 6:58am UTC](https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748/7 "2022-05-11T06:58:56Z")

</div>

Even local storage seems to have stopped working here… there is no update after epoch 1 even though model is running 4th epoch

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

---

<div class="post-metadata">

**Author:** ![merve](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/merve/32/49809_2.png) [@merve](https://discuss.huggingface.co/u/merve)\
**Post date:** [May 11, 2022, 12:23pm UTC](https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748/8 "2022-05-11T12:23:22Z")

</div>

Doing [model.push\_to\_hub()](https://huggingface.co/docs/transformers/model_sharing) should work for any model 🙂 In the link you will find the documentation to this.

---

<div class="post-metadata">

**Author:** ![osanseviero](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/osanseviero/32/38738_2.png) [@osanseviero](https://discuss.huggingface.co/u/osanseviero)\
**Post date:** [May 11, 2022, 12:53pm UTC](https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748/9 "2022-05-11T12:53:45Z")

</div>

I think we’ve seen few times issues with colab and mounted drive causing extremely slow uploads [Trainer.push\_to\_hub is taking lot of time, is this expected behaviour?](https://discuss.huggingface.co/t/trainer-push-to-hub-is-taking-lot-of-time-is-this-expected-behaviour/14162)

---

<div class="post-metadata">

**Author:** ![nateraw](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nateraw/32/2556_2.png) [@nateraw](https://discuss.huggingface.co/u/nateraw)\
**Post date:** [May 11, 2022, 11:33pm UTC](https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748/10 "2022-05-11T23:33:20Z")

</div>

@vanichandna care to share the colab notebook you’re working out of if you’re still having problems? That way we may be able to assist a bit better.

---

<div class="post-metadata">

**Author:** ![vanichandna](https://avatars.discourse-cdn.com/v4/letter/v/dc4da7/32.png) [@vanichandna](https://discuss.huggingface.co/u/vanichandna)\
**Post date:** [May 12, 2022, 10:51am UTC](https://discuss.huggingface.co/t/pushtohubcallback-not-uploading-the-model-on-huggingface-automatically/17748/11 "2022-05-12T10:51:27Z")

</div>

> **[Google Colaboratory](https://colab.research.google.com/drive/1wjC6PVayzLG0_ptwHYngg71qLmjm1qsN?usp=sharing)**

here are all the issues i m facing

1. no auto uploading of models on huggingface
2. training never stops… even after all the epochs complete, training cell doesnt stop running.
3. no intermediate updation of epochs locally
