huggingface / knockknock

🚪✊Knock Knock: Get notified when your training ends with only two additional lines of code
MIT License
2.78k stars 233 forks source link

Added telegram_print function #50

Open apthagowda97 opened 4 years ago

apthagowda97 commented 4 years ago

Thanks for this wonderful library.

When I commit a kernel in Kaggle I use knockkncok(telegram_sender) so that I 'll get to know the status of training. But the problem is I am unable to view some important data such as loss or accuracy for each epoch while the model is training.

So, I thought of writing a simple function

telegram_print(text="",token="", chat_id=CHAT_ID)

which can be used to send the message directly to telegram while training. It helps a lot to kill the kernel when the model is not performing well and thereby saving GPU.