Tools to supervise slurm jobs
Project description
Introduction
A tool to supervise jobs status via Feishu bot messages.
Currently supportted job states are : 'fail', 'complete', 'unavailable', 'cancel', 'running', 'pending'. If your job does not belong to those states, the reportted status will be 'unknown'.
Once you init a supervisor, it will be stopped if all its jobs are one of ['fail', 'complete', 'unavailable', 'cancel', 'unknown'], and will report all its jobs' status to you via your Feishu bot.
Setup Guide
-
Get webhook from your Feishu Bot.
-
Export and set webhook 'JOBS_SUPERVISOR_WEBHOOK' in your ~/.basrc. For example:
export JOBS_SUPERVISOR_WEBHOOK=https://open.feishu.cn/your-webhook
-
Export and set the directory 'JOBS_SUPERVISOR_LOGDIR' to save your sbatch output in your ~/.basrc. For example:
export JOBS_SUPERVISOR_LOGDIR=path_to_log_files
-
Run
source ~/.basrc
-
(Optional) Create an enviornment for the tools by
conda create -n env_tools python=3.8
-
Activate your enviornment by
conda activate env_tools
-
Install this python package in the enviornment by
pip3 install -i https://pypi.org/project/ jobs-supervisor==0.3.7
Usage
Assume 'jobid_start' and 'jobid_end' are int.
-
Activate your enviornment by
conda activate env_tools
-
In terminal:
supervise_jobs jobid_start jobid_end
-
You can run
supervise_jobs --help
for more configs. By default,
-
it will skip to report 'unavailable' jobs (jobs that you cannot get status). Set the option
--show_unavailable
to report unavailable jobs. -
it will only report once all jobs are stopped. If you want to report every time a job stops, set the option
--show_intermedia
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
Built Distribution
File details
Details for the file jobs_supervisor-0.3.7.tar.gz
.
File metadata
- Download URL: jobs_supervisor-0.3.7.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed6002c0fcad55a2a694ef0c7cc5716b60b01c7f0185a6d3622939d86bb916b0 |
|
MD5 | cdfbd7d528aab850f91203dc15d402d5 |
|
BLAKE2b-256 | de3f2494776b2830be8e8cd033198d31aef9abf3826e5e54a8c1ab35ccb19523 |
File details
Details for the file jobs_supervisor-0.3.7-py3-none-any.whl
.
File metadata
- Download URL: jobs_supervisor-0.3.7-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c67a7a7f3dc6ed92d8023b6bf212f3799be6bc4308a6f168616bbebe6abfb32 |
|
MD5 | 7127ad5a6dc10015cb85f4d9d6aa3ba0 |
|
BLAKE2b-256 | 98445535feb6c9f63c1da0814601daeab99f0504245e841b90849372d459f870 |