lartpang / RunIt

A simple program scheduler for your code on different devices.
MIT License
11 stars 1 forks source link
deeplearning-tool multi-gpu-scheduler multi-process multi-process-scheduler python python3 scheduler scheduler-tool single-file-scheduler tool utility

RunIt

[!NOTE] This tool still has some limitations. If you encounter any problems in use, please feel free to ask.

A simple program scheduler for your code on different devices.

Let the machine move!

Putting the machine into sleep is a disrespect for time.

Usage

[!note]

2024-8-14: Now, the config file contains the information of your GPUs and jobs, more details can be found in config.py.

Dependency

Scripts

We provides 3 scripts for different ways to run jobs.

demo

$ python run_it.py --config ./examples/config.yaml
$ python run_it.py --max-workers 3 --config ./examples/config.yaml
graph TD
    A[Start] --> B[Read Configuration and Command Pool]
    B --> C[Initialize Shared Resources]
    C --> |Maximum number of requirements met| D[Loop Until All Jobs Done]
    D --> E[Check Available GPUs]
    E -->|Enough GPUs| F[Run Job in Separate Process]
    E -->|Not Enough GPUs| G[Wait and Retry]
    F --> H[Job Completes]
    F --> I[Job Fails]
    H --> J[Update Job Status and Return GPUs]
    I --> J
    G --> D
    J -->|All Jobs Done| K[End]
    C -->|Maximum number of requirements not met| L[Terminate Workers]
    L --> M[Shutdown Manager and Join Pool]
    M --> K

Thanks