Skip to main content

Simple telegram bot for logging ML statistics.

Project description

Telegram bot ML stats.

This repository contains code for simple telegram bot for logging ML metrics.

Package description.

This package contains two classes to log ML metrics.

TGTableSummaryWriter

This writer is usefull for logging hyperparameters optimization or when you need log only numeric values.
Example:
Hyperopt

For more information see TGTableSummaryWriter example.

TGImgSummaryWriter

This writer could be used for logging neural networks metrics per epoch.
Example:
NeuralNetwork

For more information see TGImgSummaryWriter example.

Setup ml bot.

  1. Create telegram bot. Save token.
  2. Create public telegram group.
  3. Add your bot to this group. Make him an administrator.
  4. Run following code
    from tg_bot_ml.utils import create_credentials
    
    create_credentials(BOT_TOKEN, PUBLIC_CHAT_NAME, './credentials.yaml')
    
  5. 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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tg_bot_ml-0.0.9.tar.gz (16.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page