Google Chat notifier for MLflow and Ray jobs
Project description
Chat Notifier
A lightweight Python library for sending Google Chat notifications from ML workflows. It helps monitor MLflow experiments and Ray jobs and send alerts to your team automatically.
Useful for ML engineers and MLOps pipelines running long training jobs.
Features
- Send notifications to Google Chat via webhook
- Monitor MLflow experiments for new best metrics
- Send completion/failure notifications for Ray jobs
- Lightweight and easy to integrate
Installation
Install with pip:
pip install chat-notifier
MLflow Experiment Notification
This example checks if a new best metric is produced in an MLflow experiment and sends a notification.
from notifier import MLflowNotifier
nn = MLflowNotifier(
webhook_url="YOUR_GOOGLE_CHAT_WEBHOOK",
tracking_uri="http://mlflow.server",
metric_mode="max",
metric_name="mAP50"
)
nn.check_new_best(
"ppe-detection",
"228f5a2e084040d4aadc16cd22f6c12c"
)
Ray Job Notification
Send a notification when a training job starts, finishes, or fails.
from notifier import RayJobNotifier
from datetime import datetime
ray_obj = RayJobNotifier(
webhook_url="YOUR_GOOGLE_CHAT_WEBHOOK",
server="gtx-1080",
model_name="yolo11",
max_chars=2000
)
ray_obj.send_notification(
status=1,
start_time=datetime.utcnow(),
end_time=datetime.utcnow(),
logs="training finished successfully"
)
Status Codes
| Code | Meaning |
|---|---|
| 0 | Job Failed |
| 1 | Job Completed Successfully |
| 2 | Job Running |
Example Use Cases
- Notify when a new best MLflow experiment result appears
- Send alerts when Ray training jobs complete
- Monitor long-running ML pipelines
- Inform teams about experiment progress via Google Chat
License
MIT 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chat_notifier-0.1.3.tar.gz.
File metadata
- Download URL: chat_notifier-0.1.3.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
608648c2cbdf6f4d8a17d6fe3d74174aab1a4a02f9483a0b9cfd9e4c8bac8a78
|
|
| MD5 |
d3666380a0356ba347e88eabf798a649
|
|
| BLAKE2b-256 |
f6c1e79592f9624f9d96c50a39104cde15ea1edfc4ac78e8b7411f716b073ba4
|
File details
Details for the file chat_notifier-0.1.3-py3-none-any.whl.
File metadata
- Download URL: chat_notifier-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
710547dd611c9acf848eafa4d3829d27ae6d4724ad5e17eeb1332ad86caef454
|
|
| MD5 |
5051062d0bb73649905250dcc9b2ad7f
|
|
| BLAKE2b-256 |
f1697d834945283f1a0b0202a395e010db5de5077169404fb1486dc729881b90
|