-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (22 loc) · 702 Bytes
/
Makefile
File metadata and controls
32 lines (22 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.PHONY: lint format test clean train eval pyreqs fullreqs package package-all $(MODEL_DIRS)
lint:
find . -name "*.py" | xargs pylint --rcfile=.pylintrc
format:
black .
test:
pytest -m unittest discover -s tests
clean:
rm -rf __pycache__ .pytest_cache .coverage \
trained_models/ packaged_models/ logs/ test_results/
train:
python train.py
eval:
python test.py
pyreqs:
pipdeptree --freeze --warn silence | grep -E '^[a-zA-Z0-9\-]+' > requirements.txt
fullreqs:
pip freeze > requirements.txt
MODEL_DIRS := $(shell find trained_models -type d -maxdepth 1 -mindepth 1 -exec basename {} \;)
package-all: $(addprefix package-, $(MODEL_DIRS))
package-%:
python package_model_worker.py $*