Skip to main content

A package to monitor your Machine Learning trainings every where without any additional app.

Project description


Bob Telegram Tools is a python library which allows you to monitor your machine learning methods just by using Telegram without any additional application.

Documentation

See https://robertanto.github.io/bob_telegram_tools/ for detailed instruction, manuals and tutorials.

Installation instructions

You can install the package with pip:

pip install bob-telegram-tools

Getting started

import keras
from keras.models import Sequential
from keras.layers import Dense
from keras.optimizers import RMSprop
import numpy as np

from bob_telegram_tools.keras import KerasTelegramCallback
from bob_telegram_tools.bot import TelegramBot

X = np.random.rand(1000, 100)
y = (np.random.rand(1000, 3) > 0.5).astype('float32')

model = Sequential()
model.add(Dense(512, activation='relu', input_shape=(100,)))
model.add(Dense(512, activation='relu'))
model.add(Dense(3, activation='softmax'))

model.compile(loss='categorical_crossentropy',
              optimizer=RMSprop(),
              metrics=['accuracy'])

n_epochs = 3

token = '<your_token>'
user_id = int('<your_chat_id>')
bot = TelegramBot(token, user_id)

tl = KerasTelegramCallback(bot, epoch_bar=True, to_plot=[
    {
        'metrics': ['loss', 'val_loss']
    },
    {
        'metrics': ['acc', 'val_acc'],
        'title':'Accuracy plot',
        'ylabel':'acc',
        'ylim':(0, 1),
        'xlim':(1, n_epochs)
    }
])

history = model.fit(X, y,
                    batch_size=10,
                    epochs=n_epochs,
                    validation_split=0.15,
                    callbacks=[tl])

License

Code released under the GNU GENERAL PUBLIC LICENSE.

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

bob-telegram-tools-1.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bob_telegram_tools-1.1.0-py2.py3-none-any.whl (19.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file bob-telegram-tools-1.1.0.tar.gz.

File metadata

  • Download URL: bob-telegram-tools-1.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for bob-telegram-tools-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d2bab7f6de43a4ef574c1d638968be6a0759312e07cd254557deb1e173196944
MD5 df7804c8e90081a8aa04795d6e7f081c
BLAKE2b-256 83a6487030abc8d8f253b8e72a3d6b5e189931f3bc830f337b1e7595f3059ed0

See more details on using hashes here.

File details

Details for the file bob_telegram_tools-1.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: bob_telegram_tools-1.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for bob_telegram_tools-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d0a1241fa903ad1d46178016638616ed16a4e7ad04c33d50ea353547dde110a6
MD5 9b122001fa61f06edc7f5c835644ad33
BLAKE2b-256 fcf38d91cbdc758d49ba53eb06b00a78f880420770badd61625f5bd994c22a0d

See more details on using hashes here.

Supported by

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