Skip to main content

A Python package for managing and scheduling jobs on MIG-enabled GPUs dynamically.

Project description

<<<<<<< HEAD

migmanager

This repository will help you understand and let you use MIG UUID's which pynvml library does not provide support for.

migmanager 🚀

Dynamic Job Scheduler for MIG-Enabled GPUs

migmanager is a Python package designed to automate GPU job scheduling on NVIDIA MIG (Multi-Instance GPU) devices. It dynamically assigns jobs to available GPUs, monitors completion, and starts new jobs automatically.


📌 Features

Auto-detects available MIG GPUs
Runs multiple jobs in parallel
Monitors logs and frees GPUs dynamically
Customizable job commands (Run anything on GPUs)
Easy-to-use CLI


🛠 Installation

pip install migmanager




or if using from github 

git clone https://github.com/JiteshRajpal/migmanager.git
cd migmanager
pip install -e .





🚀 Quickstart
Step 1: Run Jobs Automatically

python examples/run_jobs.py --jobs 4 --gpu-auto-detect --command "python train.py"
This will:

Detect available MIG GPUs
Assign 4 jobs dynamically
Monitor logs and start new jobs when GPUs are free
Step 2: Specify Custom GPUs (Optional)
If you don't want auto-detection, manually provide GPU UUIDs:


python examples/run_jobs.py --jobs 4 --log-dir "./logs" --command "python train.py" --mig-devices MIG-xxx,MIG-yyy




How It Works
1️⃣ Detects available MIG GPUs
2️⃣ Starts jobs on free GPUs
3️⃣ Monitors log files for completion
4️⃣ Frees GPUs and starts new jobs






Troubleshooting
1️⃣ No MIG Devices Found?

RuntimeError: No MIG devices detected. Please check your setup.
✔️ Fix: Enable MIG mode
Run:


sudo nvidia-smi mig -i 0 -e 1
Then restart and try again.

2️⃣ Jobs Not Running on GPUs?
Check the log files in ./logs/ for errors:


tail -f logs/1_mig_MIG-xxxxx.log


Contributing
We welcome contributions! Open a GitHub issue or PR for any improvements.

📜 License
MIT License. Free to use and modify.

Start scheduling your GPU jobs smarter with migmanager!
>>>>>>> 11706a8 (Initial commit for migmanager package)

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

migmanager-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

migmanager-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file migmanager-0.1.0.tar.gz.

File metadata

  • Download URL: migmanager-0.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.2

File hashes

Hashes for migmanager-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d3c94ae3392710ae10315e3f7152001a2bc5bda05403746de16afb75d7c59a65
MD5 cb471d37f3466b83ad5df7bddc34db29
BLAKE2b-256 5a6e3588c675489a6e4ba5ddf7d40cb4bde9505793316b43cf9725bf22ab4e89

See more details on using hashes here.

File details

Details for the file migmanager-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: migmanager-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.2

File hashes

Hashes for migmanager-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4b1469c94db9253f5d5c9ba011afd96de35b820f45d36d0a2810bcf55d9df04
MD5 e76ff9467fa112f4378fef97982202e4
BLAKE2b-256 f6d4ca22b9f470fe29c1cd80fc1a33495305e521db3498eae1d8e679f311349b

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