36 lines
952 B
Makefile
36 lines
952 B
Makefile
DATA_PATH := ../data
|
|
DATA := $(DATA_PATH)/X_train.bin $(DATA_PATH)/X_test.bin $(DATA_PATH)/y_train.bin $(DATA_PATH)/y_test.bin
|
|
|
|
.PHONY: all start reset
|
|
|
|
all: ${DATA}
|
|
|
|
$(DATA):
|
|
@echo 'Missing $(DATA) files, use downloader first' && exit 1
|
|
|
|
venv:
|
|
@bash -c 'source activate.sh'
|
|
|
|
start: ${DATA} venv
|
|
@bash -c 'source activate.sh && python projet.py'
|
|
|
|
reset:
|
|
@echo Deleting generated states and models
|
|
@rm -rf out/* models/* | true
|
|
|
|
debug:
|
|
@bash -c 'source activate.sh && pudb projet.py'
|
|
|
|
profile:
|
|
@bash -c 'source activate.sh && python -m cProfile -o prof.out projet.py && gprof2dot -f pstats prof.out | dot -Tpng -o output.png'
|
|
|
|
mrproper: reset
|
|
@rm -r __pycache__ venv
|
|
|
|
test:
|
|
@bash -c 'source activate.sh && ls out | sed s/.pkl// | xargs -n1 python test_diff.py out'
|
|
@bash -c 'source activate.sh && ls models | sed s/.pkl// | xargs -n1 python test_diff.py models'
|
|
|
|
help:
|
|
@echo "all start reset mrproper help"
|