Google Chat notifier for MLflow and Ray jobs
Project description
Chat Notifier
Simple Python library to send Google Chat alerts for:
- MLflow best metric updates
- Ray training job status
Installation
pip install chat-notifier
or for local development
pip install -e .
MLflow Notifier Usage
Used to notify when a new best metric is achieved in MLflow.
import mlflow from notifier import MLflowNotifier
notifier = MLflowNotifier()
with mlflow.start_run() as run:
mlflow.log_metric("mAP50", 0.91)
notifier.check_new_best(
experiment_name="ppe-detection",
run_id=run.info.run_id
)
Required environment variables:
MLFLOW_TRACKING_URI=http://localhost:5000 GOOGLE_CHAT_WEBHOOK_URL=your_google_chat_webhook METRIC_NAME=mAP50 METRIC_MODE=max
Ray Job Notifier Usage
Used to notify training success or failure.
from notifier import RayJobNotifier from datetime import datetime
notifier = RayJobNotifier()
start_time = datetime.utcnow()
status = 0 logs = ""
end_time = datetime.utcnow()
notifier.send_notification( status=status, logs=logs, start_time=start_time, end_time=end_time )
Required environment variables:
GOOGLE_CHAT_RAY_WEBHOOK_URL=your_google_chat_webhook SERVER=gpu-server MODEL_NAME=my-model
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.2.tar.gz.
File metadata
- Download URL: chat_notifier-0.1.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8c75eae70b1211a85fe1f913478acbcf2c088f2cd7233c7752134effc698205
|
|
| MD5 |
a53c13dfa2d7e82b068163ba2aee0cb3
|
|
| BLAKE2b-256 |
00bd94f853de1f0f83736e4a4c721eb2b45ffdf8fdc9cad93dfd72f34cf4deca
|
File details
Details for the file chat_notifier-0.1.2-py3-none-any.whl.
File metadata
- Download URL: chat_notifier-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.9 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 |
a6666938e4545b65fbebdfad014db16dc58dd0080f9ae3b049f59d3b10872941
|
|
| MD5 |
9fe39c401dcc909b7c7ceb33ccceed50
|
|
| BLAKE2b-256 |
3c9ff8641c50a579cb957957118f4605cbbce6c7c11b69cfcb727336cd3f6ae5
|