-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathMakefile
80 lines (61 loc) · 2.64 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
73
74
75
76
77
78
79
80
include Makefile.config
NOTIFY:="DATASETS" variable not set. For long tests, clone a copy of tensorlog-datasets.git and put the path to it in your Makefile.config. For more details, see Makefile.config.template
Makefile.config: Makefile.config.template
cp $< $@
# unit tests that take a few secs to run - all of these are about a minute all told
short-tests:
python -m unittest testtensorlog
python -m unittest testxcomp $(XCOMP_FILTER)
python -m unittest testtf
all-automatic-tests: short-tests grid-test cora-test wikimovies-test simple-comline-test smokers-test fb-benchmark-test socialgraphs-test
# tests that take a few minutes to run
# run 'make prepare-for-long-tests' in a fresh install before you run these
long-tests: benchmark-test wnet-test cora-test grid-test
prepare-for-long-tests:
ifneq ($(DATASETS),)
(cd ../; PYTHONPATH=`pwd`; cd $(DATASETS)/wordnet; make setup)
(cd ../; PYTHONPATH=`pwd`; cd $(DATASETS)/cora; make setup)
else
$(error $(NOTIFY))
endif
#
# individual longer tests, which should take about 1min each
#
cora-test:
ifneq ($(DATASETS),)
(cd ../; PYTHONPATH=`pwd`; cd $(DATASETS)/cora/; make clean; make; make check; make clean; make unittest)
else
$(error $(NOTIFY))
endif
grid-test:
(cd ../; PYTHONPATH=`pwd`; cd datasets/grid/; make clean; make; make check; make clean; make unittest)
wikimovies-test:
(cd ../; PYTHONPATH=`pwd`; cd datasets/wikimovies/; make clean; make unittest)
smokers-test:
(cd ../; PYTHONPATH=`pwd`; cd datasets/smokers/; make clean; make unittest)
simple-comline-test:
python simple.py experiment --db test-data/textcattoy.cfacts --prog test-data/textcat.ppr --train test-data/toytrain.exam --test test-data/toytest.exam
fb-benchmark-test:
(cd ../; PYTHONPATH=`pwd`; cd datasets/fb15k-speed/; make clean; make unittest)
# not converted yet....
wnet-test:
ifneq ($(DATASETS),)
(cd ../; PYTHONPATH=`pwd`; cd $(DATASETS)/wordnet/; make clean; make; make check)
else
$(error $(NOTIFY))
endif
# debug-test needs to be interactive
debug-test:
PYTHONPATH=../; python expt.py --prog test-data/textcat.ppr --db test-data/textcattoy.cfacts \
--trainData test-data/toytrain.exam --testData test-data/toytest.exam --proppr +++ --savedModel expt-model.db
PYTHONPATH=../; python debug.py --prog test-data/textcat.ppr --db expt-model.db --trainData test-data/toytrain.exam --testData test-data/toytest.exam --proppr predict/io
# word count
wc:
wc `ls *.py | grep -v test | grep -v try`
# cleanup
clean:
rm -f *.pyc *.py~ *.prof
rm -f toy-test.examples toy-test.solutions.txt toy-train.examples
rm -rf toy-trained.db
dist:
tar -cvf ../tensorlog-dist.tar ../LICENSE Makefile Makefile.config.template *.py test-data/*.*