891 B
891 B
Pytorch-Lightning Tests
Running tests
To run all tests do the following:
git clone https://github.com/williamFalcon/pytorch-lightning
cd pytorch-lightning
# install module locally
pip install -e .
# install dev deps
pip install -r requirements.txt
# run tests
py.test
# or to generate coverage
pip install coverage
coverage run tests/test_models.py
To test models that require GPU make sure to run the above command on a GPU machine. The GPU machine must have:
- At least 2 GPUs.
- NVIDIA-apex installed.
test_models.py
This file fits a tiny model on MNIST using these different set-ups.
- CPU only.
- Single GPU with DP.
- Multiple (2) GPUs using DP.
- Multiple (2) GPUs using DDP.
- Multiple (2) GPUs using DP + apex (for 16-bit precision).
- Multiple (2) GPUs using DDP + apex (for 16-bit precision).