Skip to main content

GPU Task Scheduler

A simple Python lib to schedule and execute deep learning tasks on available GPUs. It supports:

  • Custom selection of GPUs.
  • Maximum concurrency per GPU.
  • Dynamic task dispatch using threading.

📦 Installation

pip install gpu_task_scheduler

🚀 Usage Example

from gpu_task_scheduler import GPUTaskScheduler

tasks = [
    "python train_model.py --epochs 10",
    "bash run_simulation.sh",
    "python evaluate.py --model checkpoint.pth"
]

scheduler = GPUTaskScheduler(
    wait_interval=10,
    allowed_gpu_ids=[0, 1],
    max_tasks_per_gpu=2,
    min_memory=0.8
)
scheduler.run_tasks(tasks)

⚙️ Parameters

GPUTaskScheduler(wait_interval=30, allowed_gpu_ids=None, max_tasks_per_gpu=1, min_memory=0.8)

Parameter Type Default Description
wait_interval int 30 Number of seconds to wait before checking again if no GPU is available.
allowed_gpu_ids list[int] None List of GPU indices (e.g., [0, 1]) that the scheduler is allowed to use. If None, all GPUs are considered.
max_tasks_per_gpu int 1 Maximum number of concurrent tasks allowed on a single GPU. Helps share GPU among multiple tasks.
min_memory int or float 0.8 Minimum free memory (in MiB or as a ratio) required on a GPU to be considered available.

🛠️ Requirements

  • Python 3.6+
  • nvidia-smi available in PATH (NVIDIA drivers installed)

Metadata

Release files for gpu-task-scheduler 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gpu-task-scheduler 0.4.0
File Size Uploaded Provenance Actions
gpu_task_scheduler-0.4.0.tar.gz 4.1 kB With provenance Details for gpu_task_scheduler-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gpu-task-scheduler 0.4.0
File Interpreter ABI Platform Actions
gpu_task_scheduler-0.4.0-py3-none-any.whl Python 3 none any Details for gpu_task_scheduler-0.4.0-py3-none-any.whl

Total release size: 8.9 kB

Release files / gpu_task_scheduler-0.4.0.tar.gz

Download URL gpu_task_scheduler-0.4.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c9545167671e0b035f5c49849500ad5340f65af6540d76fbabd0ecdd994d12c8
BLAKE2b-256 checksum
How to use checksums
367f91bb1ea209223e1db170b99825a0d78d4020186240f7b6d2a32c8625dd2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 16, 2025.

Transparency log

Release files / gpu_task_scheduler-0.4.0-py3-none-any.whl

Download URL gpu_task_scheduler-0.4.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
259ebf87e4456f4f39d18c51e4ef5c98723125b2a8505b8c45122c58f7c98e03
BLAKE2b-256 checksum
How to use checksums
02f5a21ecb93144edaab29d906c5360bead4563ae2296ad9c5026fbcfe2b08d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 16, 2025.

Transparency log

Security for gpu-task-scheduler 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gpu_task_scheduler-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 16, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page