-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
72 lines (63 loc) · 2.21 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.PHONY: all install docs lint format test clean FORCE
all: docs test
install:
pip install -e .[dev]
docs: FORCE
mkdir -p docs/source/_static
$(MAKE) -C docs html
lint: FORCE
flake8
black --check .
isort --check .
python scripts/update_headers.py --check
python test/test_import.py
license: FORCE
python scripts/update_headers.py
format: license FORCE
black .
isort .
test: lint FORCE
ifeq (${FUNSOR_BACKEND}, torch)
pytest -v -n auto test/
FUNSOR_DEBUG=1 pytest -v test/test_gaussian.py
FUNSOR_PROFILE=99 pytest -v test/test_einsum.py
FUNSOR_USE_TCO=1 pytest -v test/test_terms.py
FUNSOR_USE_TCO=1 pytest -v test/test_einsum.py
python examples/adam.py -n 2
python examples/discrete_hmm.py -n 2
python examples/discrete_hmm.py -n 2 -t 50 --lazy
FUNSOR_USE_TCO=1 python examples/discrete_hmm.py -n 1 -t 50 --lazy
FUNSOR_USE_TCO=1 python examples/discrete_hmm.py -n 1 -t 500 --lazy
python examples/forward_backward.py -t 3
python examples/kalman_filter.py -n 2
python examples/kalman_filter.py -n 2 -t 50 --lazy
FUNSOR_USE_TCO=1 python examples/kalman_filter.py -n 1 -t 50 --lazy
FUNSOR_USE_TCO=1 python examples/kalman_filter.py -n 1 -t 500 --lazy
python examples/minipyro.py
python examples/minipyro.py --jit
python examples/slds.py -n 2 -t 50
python examples/pcfg.py --size 3
python examples/talbot.py -n 2
python examples/vae.py --smoke-test
python examples/eeg_slds.py --num-steps 2 --fon --test
python examples/mixed_hmm/experiment.py -d seal -i discrete -g discrete -zi --smoke
python examples/mixed_hmm/experiment.py -d seal -i discrete -g discrete -zi --parallel --smoke
python examples/sensor.py --seed=0 --num-frames=2 -n 1
python examples/adam.py --num-steps=21
@echo PASS
else ifeq (${FUNSOR_BACKEND}, jax)
pytest -v -n auto --ignore=test/examples --ignore=test/pyro --ignore=test/pyroapi \
--ignore=test/test_distribution.py --ignore=test/test_distribution_generic.py \
--ignore=test/torch
pytest -v -n auto test/test_distribution.py
pytest -v -n auto test/test_distribution_generic.py
@echo PASS
else
# default backend
pytest -v -n auto --ignore=test/examples --ignore=test/pyro \
--ignore=test/pyroapi --ignore=test/torch
@echo PASS
endif
clean: FORCE
git clean -dfx -e funsor-egg.info
FORCE: