Skip to main content

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

  1. Get webhook from your Feishu Bot.

  2. Export and set webhook 'JOBS_SUPERVISOR_WEBHOOK' in your ~/.basrc. For example: export JOBS_SUPERVISOR_WEBHOOK=https://open.feishu.cn/your-webhook

  3. 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

  4. Run source ~/.basrc

  5. (Optional) Create an enviornment for the tools by conda create -n env_tools python=3.8

  6. Activate your enviornment by conda activate env_tools

  7. Install this python package in the enviornment by pip3 install -i https://pypi.org/project/ jobs-supervisor==0.3.1

Usage

Assume 'jobid_start' and 'jobid_end' are int.

  1. Activate your enviornment by conda activate env_tools

  2. In terminal: supervise_jobs jobid_start jobid_end

  3. 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


Download files

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

Source Distribution

jobs_supervisor-0.3.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

jobs_supervisor-0.3.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file jobs_supervisor-0.3.1.tar.gz.

File metadata

  • Download URL: jobs_supervisor-0.3.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.3

File hashes

Hashes for jobs_supervisor-0.3.1.tar.gz
Algorithm Hash digest
SHA256 efff78f63e9847bf7ec1dcaa18df2c66f425362fbe3f3f0984de6a2c916febdb
MD5 80b584d364ce00247ebe19406037357e
BLAKE2b-256 9c1174d5a09b960c89968b5ea99fc0611af31744b02ffaaaedcdb1801284e8fa

See more details on using hashes here.

File details

Details for the file jobs_supervisor-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jobs_supervisor-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a06786c9146872fd064139dbba7c2b100c1b1100daaf6b8a7fa6fb9e68d1ec38
MD5 afa0ef3530ba154fb0226c1747b7bfad
BLAKE2b-256 fb82075a38bf0e4c1b49463d6ce9d309cd1b5700ce2263663625374c418b0340

See more details on using hashes here.

Supported by

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