[make] Create Makefile (#4620)

* [make] Create Makefile

* exclude makefile

* contributing info

* rm .run_local_test.sh
This commit is contained in:
Jeff Yang 2020-11-12 15:55:31 +06:30 committed by GitHub
parent 396a18eb78
commit 79fc92647c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 16 deletions

View File

@ -182,10 +182,10 @@ python -m pip install ".[dev, examples]"
python -m pip install pre-commit
```
You can run the full test-case in your terminal via this bash script:
You can run the full test-case in your terminal via this make script:
```bash
bash .run_local_tests.sh
make test
```
Note: if your computer does not have multi-GPU nor TPU these tests are skipped.

View File

@ -1,14 +0,0 @@
#!/usr/bin/env bash
# install APEX, see https://github.com/NVIDIA/apex#linux
# to imitate SLURM set only single node
export SLURM_LOCALID=0
# use this to run tests
rm -rf _ckpt_*
rm -rf ./lightning_logs
python -m coverage run --source pytorch_lightning -m py.test pytorch_lightning tests pl_examples -v --flake8
python -m coverage report -m
# specific file
# python -m coverage run --source pytorch_lightning -m py.test --flake8 --durations=0 -v -k

View File

@ -57,6 +57,9 @@ exclude *.yaml
# Exclude pyright config
exclude .pyrightconfig.json
# Exclude Makefile
exclude Makefile
prune .git
prune .github
prune .circleci

15
Makefile Normal file
View File

@ -0,0 +1,15 @@
.PHONY: test
test:
# install APEX, see https://github.com/NVIDIA/apex#linux
# to imitate SLURM set only single node
export SLURM_LOCALID=0
# use this to run tests
rm -rf _ckpt_*
rm -rf ./lightning_logs
python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests pl_examples -v --flake8
python -m coverage report -m
# specific file
# python -m coverage run --source pytorch_lightning -m py.test --flake8 --durations=0 -v -k