Skip to main content

Communicate your project updates via Telegram Bot!

Project description

ChaterJee

ChaterJee

Often, we need to run computational trial and error experiments by just tweaking one or two key parameters. In machine learning, you face similar problems during hyperparameter tuning experiments.

These are probably the most boring, time-consuming, yet unavoidable phases in our day-to-day research. But what if your experiments could keep working while you're at a date XD ? What if you could kick off a hyperparameter tuning run just before bed — and wake up with results and plots waiting on your phone, like a good morning message from your research? Real-time updates, one-tap reruns, and zero late-night debugging. It’s like having a research assistant in your pocket.

Let me introduce ChaterJee to you — a playful fusion of Chater, meaning one who chats, and Jee, an honorific used in Indian culture to show respect. Think of ChaterJee as the lab assistant you always wanted — one who actually responds, never crashes your code, doesn't ask for co-authorship, and definitely doesn't need coffee all the time, unlike you.

Installation

You need two things:

  1. The ChaterJee module
  2. A telegram BOT that you own

Installing the module

I recommend to install ChaterJee module inside your project's conda environment for a seamless experience.

conda activate yourenv
pip install ChaterJee

Get your telegram BOT

To use this ChaterJee, you'll need a Telegram Bot Token and your Chat ID. Follow these simple steps:

Create a Bot and Get the Token

  • Open Telegram and search for @BotFather.
  • Start a chat and send the command /newbot.
  • Follow the prompts: choose a name and a username for your bot.
  • Once done, BotFather will give you a bot token — a long string like 123456789:ABCdefGhiJKlmNoPQRsTuvWXyz.

Get Your Chat ID

  • Open Telegram and start a chat with your newly created bot by searching its username.

  • Send Hi (any message) to your bot.

  • Open your browser and visit this URL, replacing YOUR_BOT_TOKEN with your token: https://api.telegram.org/bot{YOUR_BOT_TOKEN}/getUpdates

    with the above token, this URL becomes: https://api.telegram.org/bot123456789:ABCdefGhiJKlmNoPQRsTuvWXyz/getUpdates

  • Look for "chat":{"id":...} in the JSON response. This number is your Chat ID.

Quick Start

ChaterJee has two components.

  • NoteLogs class: This stores log files, and save project locations for parsing updates.
  • ChatLogs class: This reads log files, the last line is sent to you via the BOT. It can also share you final plots that you need for your next rerun.

The minimal example

This will register your JOB with the given JOB_NAME and logfiles into a JSON file, <your home>/.data/JOB_status.json.

# This is a minimal example
import ChaterJee

# your code here
JOB_NAME = "job_0.1.10"
OUT_NAME = "experiment_0.1"

for i in range(N):
    # Your code here
    notelogs = ChaterJee.NoteLogs()
    notelogs.write(f"{JOB_NAME}",\
    logSTRING=f"Step {i} done.",\
    logFILE=f"{OUT_NAME}.log",\
    logIMAGE=f"{OUT_NAME}.png")

Next step is to receive updates on your projects.

# Run this instance separately to parse job updates
# This is the one which actually communicates with your BOT.

import ChaterJee

if __name__ == '__main__':
    TOKEN = '123456789:ABCdefGhiJKlmNoPQRsTuvWXyz'
    CHATID = '123456789'

    cbot = ChaterJee.ChatLogs(TOKEN, CHATID)
    cbot.cmdTRIGGER()

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

chaterjee-0.2.3.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

chaterjee-0.2.3-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file chaterjee-0.2.3.tar.gz.

File metadata

  • Download URL: chaterjee-0.2.3.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for chaterjee-0.2.3.tar.gz
Algorithm Hash digest
SHA256 0c2621f9cbbb80766452b04b7d155d2ddb8cd4f40cd65bd71e218f71c68e13f5
MD5 11a4087d911e65dac939fc26c9d4c614
BLAKE2b-256 2c67a603866c110a6d9519fc93a8b575e62ffb3227296c115f32cb2e45bdf907

See more details on using hashes here.

File details

Details for the file chaterjee-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: chaterjee-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for chaterjee-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7a322b07a0ec84282898a8065da720246d3754412709917c3dba3b1d135d1e4b
MD5 d988d4b980ed32b9b604a5c8c7873a58
BLAKE2b-256 74ba36dcb9f94bffd840fec245786b71934284790f73c2744574114921296db6

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