-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
54 lines (31 loc) · 981 Bytes
/
Makefile
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
33
34
35
36
37
38
# Makefile based on https://github.com/shreyashankar/create-ml-app
.PHONY: help lint run
# Makefile variables
VENV_NAME:=venv
PYTHON=${VENV_NAME}/bin/python3
# Include your variables here
RANDOM_SEED:=42
NUM_EPOCHS:=15
INPUT_DIM:=784
HIDDEN_DIM:=128
OUTPUT_DIM:=10
.DEFAULT: help
help:
@echo "make venv"
@echo " prepare development environment, use only once"
@echo "make lint"
@echo " run pylint"
@echo "make run"
@echo " run project"
# Install dependencies whenever setup.py is changed.
venv: $(VENV_NAME)/bin/activate
$(VENV_NAME)/bin/activate: setup.py
test -d $(VENV_NAME) || python3 -m venv $(VENV_NAME)
${PYTHON} -m pip install -U pip
${PYTHON} -m pip install -e .
rm -rf ./*.egg-info
touch $(VENV_NAME)/bin/activate
# lint: venv
# ${PYTHON} -m pylint main.py
# run: venv
# ${PYTHON} main.py --seed $(RANDOM_SEED) --num_epochs $(NUM_EPOCHS) --input_dim $(INPUT_DIM) --hidden_dim $(HIDDEN_DIM) --output_dim $(OUTPUT_DIM)