2021-02-01 16:09:12 +00:00
|
|
|
.PHONY: test clean docs
|
|
|
|
|
|
|
|
# to imitate SLURM set only single node
|
|
|
|
export SLURM_LOCALID=0
|
|
|
|
# assume you have installed need packages
|
2021-02-11 10:22:07 +00:00
|
|
|
export SPHINX_MOCK_REQUIREMENTS=1
|
2020-11-12 09:25:31 +00:00
|
|
|
|
2021-02-05 23:33:12 +00:00
|
|
|
clean:
|
|
|
|
# clean all temp runs
|
|
|
|
rm -rf $(shell find . -name "mlruns")
|
|
|
|
rm -rf $(shell find . -name "lightning_log")
|
2021-02-08 01:31:44 +00:00
|
|
|
rm -rf $(shell find . -name "lightning_logs")
|
2021-02-05 23:33:12 +00:00
|
|
|
rm -rf _ckpt_*
|
|
|
|
rm -rf .mypy_cache
|
|
|
|
rm -rf .pytest_cache
|
|
|
|
rm -rf ./docs/build
|
|
|
|
rm -rf ./docs/source/generated
|
|
|
|
rm -rf ./docs/source/*/generated
|
|
|
|
rm -rf ./docs/source/api
|
|
|
|
|
|
|
|
test: clean
|
2021-02-15 19:05:49 +00:00
|
|
|
# Review the CONTRIBUTING docmentation for other ways to test.
|
2021-02-01 16:09:12 +00:00
|
|
|
pip install -r requirements/devel.txt
|
2020-11-12 09:25:31 +00:00
|
|
|
# install APEX, see https://github.com/NVIDIA/apex#linux
|
|
|
|
|
2021-02-15 19:05:49 +00:00
|
|
|
# run tests with coverage
|
2021-02-12 17:25:08 +00:00
|
|
|
python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests pl_examples -v
|
2021-02-01 16:09:12 +00:00
|
|
|
python -m coverage report
|
2020-11-12 09:25:31 +00:00
|
|
|
|
2021-02-01 16:09:12 +00:00
|
|
|
docs: clean
|
|
|
|
pip install --quiet -r requirements/docs.txt
|
2021-03-23 07:51:45 +00:00
|
|
|
python -m sphinx -b html -W --keep-going docs/source docs/build
|