Skip to main content

Simple GPU Queue: For running lots of smaller experiments on your handful of GPUs, designed for JAX

Project description

Simple GPU Queue

Simple GPU Queue: For running lots of smaller experiments on your handful of GPUs

Functional, minimal.

Quickstart

pip install simple_gpu_queue
simpleq_start 4 --memfrac-per-proc=0.45 # Start 2 processes per gpu, each taking 0.45 the total amount of GPU RAM available

Example python launch script

from simple_gpu_queue.simple_gpu_queue import GPUQueueClient
queue = GPUQueueClient(git_commit_id="most_recent")

# Send commands as a list of (command, stdout_file) tuples. Stdoutfile can be "" for no saving of stdout logging.
commands = [
    ("python -c 'import time; import jax.numpy as jnp; a=jnp.ones(5); time.sleep(1); print(\"I SLEPT HAPPY 1\")'", "testlogs/v1.txt"),
    ("python -c 'import time; import jax.numpy as jnp; a=jnp.ones(5); time.sleep(2); print(\"I SLEPT HAPPY 2\")'", ""),
    ("python -c 'import time; import jax.numpy as jnp; a=jnp.ones(5); time.sleep(3); print(\"I SLEPT HAPPY 3\")'", "testlogs/v3.txt"),
]

if queue.git_repo.is_dirty():
    user_input = input("Repo has uncommitted changes: continue? [Y/n] ").strip().lower()
    if user_input == 'n':
        raise ValueError("Aborting due to uncommitted changes in the repository.") 

queue.send_command_list(commands)

For Development

conda env create -f environment.yml
conda activate simple-gpu-queue
pip install -r requirements.txt
# pip install -r requirements-dev.txt

Check the server is running, navigate to http://localhost:5034/docs, test the routes

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

simple_gpu_queue-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

simple_gpu_queue-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simple_gpu_queue-0.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for simple_gpu_queue-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dab05190640ba13a6b13a743df1923fc0fe4650b7138885d24fc739c883af9dd
MD5 a48793d81a82b6edb596fdfe7a0a0c5d
BLAKE2b-256 5ee8d88dd56e55a7309b5a87e2942b1dcd9aed063210001775469ded80e93f22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simple_gpu_queue-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7791b454ed6e2bf4136a13e136c2a29bc50fdd7846fc13278e2633d1d1d3500e
MD5 9355ad8966be56e13bfdcd572177f03f
BLAKE2b-256 bbaa63408d180310c0c0a3fb98ec35a8e6053f8b9eb96424a00926a9fa185383

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