This repository contains code for simple telegram bot for logging ML metrics.
pip install tg-bot-ml
This package contains two classes to log ML metrics.
This writer is usefull for logging hyperparameters optimization or when you need log only numeric values.
Example:
For more information see example : examples/hyperparams_gb.py
This writer could be used for logging neural networks metrics per epoch.
Example:
For more information see example : examples/tg_bot_nn_segmentation.py
- Create telegram bot. Save token.
- Create public telegram group.
- Add your bot to this group. Make him an administrator.
- Run following code
from tg_bot_ml.utils import create_credentials create_credentials(BOT_TOKEN, PUBLIC_CHAT_NAME, './credentials.yaml')
- Make your group private.
In the end you will have file credentials.yaml that you can use to write logs into this group.
For example :
from tg_bot_ml.table_bot import TGTableSummaryWriter
if __name__ == '__main__':
tg_bot = TGTableSummaryWriter('../credentials.yaml', 'Catboost Hyperopt : Customer Churn')
tg_bot.add_record(lr=1e-3, n_estimators=100, MSE=1.3)
tg_bot.send(sort_by="MSE", ascending=False)