-
Notifications
You must be signed in to change notification settings - Fork 46
/
Makefile
36 lines (30 loc) · 888 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
.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)