Get Telegram notifications for your Kaggle training runs — epoch updates, crash alerts, and completion messages. Zero config. One line of code.
| Feature | Description |
|---|---|
| 📊 Epoch updates | Loss, accuracy + trend arrows ↑↓ after every epoch |
| 🏆 Best model alert | Fires whenever val_accuracy hits a new high |
| ⏱ ETA | Time elapsed shown in every message |
| ❌ Crash alerts | Full traceback + CUDA OOM detection sent to Telegram |
| 🔇 Fail-silent | Telegram errors never crash your training |
| 🧩 4 frameworks | Keras, PyTorch, HuggingFace, Sklearn |
from kaggle_notify import setup, KerasNotifyCallback
notifier = setup("My Experiment") # sends a test ping immediately
model.fit(X_train, y_train,
callbacks=[KerasNotifyCallback(notifier)])# In a Kaggle notebook cell:
!pip install requests # already installed, but just in case
!wget https://raw.githubusercontent.com/XMGMAX/kaggle-notify/main/kaggle_notify.pySee SETUP.md for the full BotFather + Kaggle Secrets walkthrough.
TL;DR:
- Create a bot via @BotFather → get
BOT_TOKEN - Get your Chat ID from @userinfobot
- Add both as Kaggle Secrets:
TELEGRAM_BOT_TOKENandTELEGRAM_CHAT_ID
Epoch update:
📊 My Experiment — Epoch 5/10 ⏱ 12m 34s
loss: 0.3421 ↓
accuracy: 0.8812 ↑
val_loss: 0.4102 ↓
val_accuracy: 0.8654 ↑
Completion:
🎉 Training Complete!
📌 My Experiment
⏱ Time: 47m 32s
📈 Best Val Accuracy: 0.8921
Crash alert:
❌ Training Crashed!
⏱ Failed at: 23m 11s
💥 RuntimeError: CUDA out of memory
💡 Tip: Reduce batch size or use gradient checkpointing.
📋 Traceback...
| Framework | File |
|---|---|
| Keras / TensorFlow | examples/keras_example.py |
| PyTorch | examples/pytorch_example.py |
| HuggingFace | examples/huggingface_example.py |
| Scikit-learn | examples/sklearn_example.py |
MIT — Built by XMGMAX