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
|
2022-08-23 19:28:53 +00:00
|
|
|
# install only Lightning Trainer packages
|
|
|
|
export PACKAGE_NAME=pytorch
|
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
|
2022-06-15 14:54:53 +00:00
|
|
|
rm -rf ./docs/source-pytorch/notebooks
|
|
|
|
rm -rf ./docs/source-pytorch/generated
|
|
|
|
rm -rf ./docs/source-pytorch/*/generated
|
|
|
|
rm -rf ./docs/source-pytorch/api
|
2022-06-17 03:07:30 +00:00
|
|
|
rm -rf ./docs/source-app/generated
|
|
|
|
rm -rf ./docs/source-app/*/generated
|
2022-08-30 13:25:05 +00:00
|
|
|
rm -rf ./docs/source-lit/api
|
|
|
|
rm -rf ./docs/source-lit/generated
|
|
|
|
rm -rf ./docs/source-lit/*/generated
|
2022-06-15 14:54:53 +00:00
|
|
|
rm -rf build
|
|
|
|
rm -rf dist
|
2022-06-15 00:54:55 +00:00
|
|
|
rm -rf *.egg-info
|
|
|
|
rm -rf src/*.egg-info
|
2022-06-27 13:34:18 +00:00
|
|
|
rm -rf src/lightning/*/
|
2021-02-05 23:33:12 +00:00
|
|
|
|
|
|
|
test: clean
|
2022-05-09 13:25:53 +00:00
|
|
|
# Review the CONTRIBUTING documentation for other ways to test.
|
2022-09-26 10:27:46 +00:00
|
|
|
pip install -e . \
|
|
|
|
-r requirements/pytorch/base.txt \
|
|
|
|
-r requirements/app/base.txt \
|
|
|
|
-r requirements/lite/base.txt \
|
|
|
|
-r requirements/pytorch/test.txt \
|
|
|
|
-r requirements/app/test.txt
|
|
|
|
|
2021-02-15 19:05:49 +00:00
|
|
|
# run tests with coverage
|
2022-08-23 19:28:53 +00:00
|
|
|
python -m coverage run --source src/pytorch_lightning -m pytest src/pytorch_lightning tests/tests_pytorch -v
|
2022-09-26 10:27:46 +00:00
|
|
|
python -m coverage run --source src/lightning_app -m pytest tests/tests_app -v
|
|
|
|
python -m coverage run --source src/lightning_lite -m pytest src/lightning_lite tests/tests_lite -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
|
2022-09-26 10:27:46 +00:00
|
|
|
pip install -e . --quiet -r requirements/lit/docs.txt
|
|
|
|
cd docs/source-lit && $(MAKE) html
|
2022-01-16 04:08:11 +00:00
|
|
|
|
|
|
|
update:
|
|
|
|
git submodule update --init --recursive --remote
|