Skip to main content

A python template

Project description

gpu_tester

pypi Open In Colab Try it on gitpod

Gpu tester finds all your bad gpus.

Works on slurm.

Install

pip3 install torch --extra-index-url https://download.pytorch.org/whl/cu116

then

pip install gpu_tester

Python examples

Checkout these examples to call this as a lib:

API

This module exposes a single function gpu_tester which takes the same arguments as the command line tool:

  • cluster the cluster. (default slurm)
  • job_name slurm job name. (default gpu_tester)
  • partition slurm partition. (default compute-od-gpu)
  • gpu_per_node numbe of gpu per node. (default 8)
  • nodes number of gpu nodes. (default 1)
  • output_folder the output folder. (default None which means current folder / results)
  • job_timeout job timeout (default 300 seconds)

For development

Either locally, or in gitpod (do export PIP_USER=false there)

Setup a virtualenv:

python3 -m venv .env
source .env/bin/activate
pip install -e .

to run tests:

pip install -r requirements-test.txt

then

make lint
make test

You can use make black to reformat the code

python -m pytest -x -s -v tests -k "dummy" to run a specific test

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

gpu_tester-1.0.0.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

gpu_tester-1.0.0-py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 3

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