huggingface / huggingface/knockknock

Telegram doesn't work

Open
#84 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.8k
Forks
223
PR merge metrics
No merged PRs in 30d

Description

I'm using the following code as indicate in [Readme](https://github.com/huggingface/knockknock?tab=readme-ov-file#telegram):
```python3
# !pip install knockknock
from knockknock import telegram_sender

CHAT_ID: int =
token =
@telegram_sender(token=token, chat_id=CHAT_ID)
def train_your_nicest_model(your_nicest_parameters):
import time
time.sleep(10000)
return {'loss': 0.9} # Optional return value
```

with the same chat_id and token I'm using successfully [tqdm](https://tqdm.github.io/docs/contrib.telegram/):

```python
from tqdm.contrib.telegram import tqdm, trange
import time

token =
chat_id =

for i in trange(10, token=token, chat_id=chat_id, desc="Processing..."):
time.sleep(1)
```
![imagen](https://github.com/user-attachments/assets/e37b3e2f-19c0-4186-abdf-5470f89868fb)

What am I doing wrong?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Telegram example in the README and the `telegram_sender` decorator shown in this report. Reproduce the behavior using the supplied comparison with `tqdm.contrib.telegram`, then determine why the decorator does not send a notification. Done means the documented example works with the same token and chat ID, or the issue clearly documents the required correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.