-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
52 lines (40 loc) · 1.16 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
ifeq (, $(shell which python))
$(error "Python not found in PATH - have you installed it?")
endif
PYTHON_REQUIRED_VERSION=3
PYTHON_VERSION=$(shell python -V 2>&1 | cut -d ' ' -f 2 | cut -d . -f 1)
PYTHON_FULL_VERSION=$(shell python -V 2>&1)
ifneq ($(PYTHON_REQUIRED_VERSION), $(PYTHON_VERSION))
$(error "You are running $(PYTHON_FULL_VERSION). This repository requires Python $(PYTHON_REQUIRED_VERSION).")
endif
# Define macros
UNAME_S := $(shell uname -s)
PYTHON := python
## HYDRA_FLAGS : set as -m for multirun
HYDRA_FLAGS := -m
USE_WANDB := True
SEED := 0
## DENSITY : pass multiple densities via commandline
DENSITY := 0.2
.PHONY: help docs
.DEFAULT: help
## install: install all dependencies
install:
pip install -r requirements.txt --upgrade
pip install -e .
## docs: build documentation
docs.%:
$(MAKE) -C docs_src $*
help : Makefile makefiles/*.mk
ifeq ($(UNAME_S),Linux)
@sed -ns -e '$$a\\' -e 's/^##//p' $^
endif
ifeq ($(UNAME_S),Darwin)
ifneq (, $(shell which gsed))
@gsed -sn -e 's/^##//p' -e '$$a\\' $^
else
@sed -n 's/^##//p' $^
endif
endif
include makefiles/*.mk
all: cifar10 cifar100 cifar10_tune vis