aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules4
-rw-r--r--.travis.yml2
-rw-r--r--Dockerfile9
-rw-r--r--Makefile66
4 files changed, 48 insertions, 33 deletions
diff --git a/.gitmodules b/.gitmodules
index 28312620..3172a149 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,8 +1,8 @@
[submodule "execs/python/bocpdms"]
path = execs/python/bocpdms
- url = ssh://git@github.com/GjjvdBurg/bocpdms.git
+ url = https://github.com/GjjvdBurg/bocpdms.git
branch = fixes
[submodule "execs/python/rbocpdms"]
path = execs/python/rbocpdms
- url = ssh://git@github.com/GjjvdBurg/rbocpdms.git
+ url = https://github.com/GjjvdBurg/rbocpdms.git
branch = fixes
diff --git a/.travis.yml b/.travis.yml
index 58c558a9..f23b432d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,4 +8,4 @@ before_install:
script:
- mkdir -p /home/travis/build/alan-turing-institute/analysis/output
- - docker run -v /home/travis/build/alan-turing-institute/analysis/output:/TCPDBench/analysis/output alan-turing-institute/tcpdbench /bin/bash -c "make results && git diff"
+ - docker run -v /home/travis/build/alan-turing-institute/analysis/output:/TCPDBench/analysis/output alan-turing-institute/tcpdbench /bin/bash -c "make results && git checkout ./analysis/output/rankplots/*.pdf && git diff --exit-code"
diff --git a/Dockerfile b/Dockerfile
index f84ebaac..3c417153 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,6 +8,7 @@ RUN apt-get update && \
build-essential \
r-base \
latexmk \
+ texlive-latex-extra \
libopenmpi-dev \
liblzma-dev
@@ -22,6 +23,9 @@ RUN apt-get install -y --no-install-recommends \
cd /usr/local/bin && ln -s /usr/bin/python3 python && \
pip install virtualenv abed
+# Set the default shell to bash
+RUN mv /bin/sh /bin/sh.old && cp /bin/bash /bin/sh
+
# Clone the dataset repo
RUN git clone https://github.com/alan-turing-institute/TCPD
@@ -32,7 +36,10 @@ RUN cd TCPD && make export
RUN git clone --recurse-submodules https://github.com/alan-turing-institute/TCPDBench
# Copy the datasets into the benchmark dir
-RUN mkdir -p TCPDBench/datasets && cp TCPD/export/*.json TCPDBench/dataset/
+RUN mkdir -p /TCPDBench/datasets && cp TCPD/export/*.json /TCPDBench/datasets/
+
+# Install Python dependencies
+RUN pip install -r /TCPDBench/analysis/requirements.txt
# Set the working directory
WORKDIR TCPDBench
diff --git a/Makefile b/Makefile
index 40ab0985..054a3972 100644
--- a/Makefile
+++ b/Makefile
@@ -65,6 +65,9 @@ clean_summaries:
.PHONY: tables default_tables best_tables aggregate_wide
+table-dir:
+ mkdir -p $(TABLE_DIR)
+
tables: default_tables best_tables aggregate_wide
best_tables: \
@@ -77,28 +80,28 @@ best_tables: \
$(TABLE_DIR)/best_f1_uni_full.json \
$(TABLE_DIR)/best_cover_uni_full.json
-$(TABLE_DIR)/best_f1_combined_full.tex: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/best_f1_combined_full.tex: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e best -m f1 -d combined -f tex -t full > $@
-$(TABLE_DIR)/best_cover_combined_full.tex: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/best_cover_combined_full.tex: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e best -m cover -d combined -f tex -t full > $@
-$(TABLE_DIR)/best_f1_uni_avg.json: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/best_f1_uni_avg.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e best -m f1 -d uni -f json -t avg > $@
-$(TABLE_DIR)/best_f1_multi_avg.json: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/best_f1_multi_avg.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e best -m f1 -d multi -f json -t avg > $@
-$(TABLE_DIR)/best_cover_uni_avg.json: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/best_cover_uni_avg.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e best -m cover -d uni -f json -t avg > $@
-$(TABLE_DIR)/best_cover_multi_avg.json: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/best_cover_multi_avg.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e best -m cover -d multi -f json -t avg > $@
-$(TABLE_DIR)/best_cover_uni_full.json: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/best_cover_uni_full.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e best -m cover -d uni -f json -t full > $@
-$(TABLE_DIR)/best_f1_uni_full.json: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/best_f1_uni_full.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e best -m f1 -d uni -f json -t full > $@
default_tables: \
@@ -111,28 +114,28 @@ default_tables: \
$(TABLE_DIR)/default_cover_uni_full.json \
$(TABLE_DIR)/default_f1_uni_full.json
-$(TABLE_DIR)/default_f1_combined_full.tex: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/default_f1_combined_full.tex: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e default -m f1 -d combined -f tex -t full > $@
-$(TABLE_DIR)/default_cover_combined_full.tex: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/default_cover_combined_full.tex: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e default -m cover -d combined -f tex -t full > $@
-$(TABLE_DIR)/default_f1_uni_avg.json: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/default_f1_uni_avg.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e default -m f1 -d uni -f json -t avg > $@
-$(TABLE_DIR)/default_f1_multi_avg.json: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/default_f1_multi_avg.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e default -m f1 -d multi -f json -t avg > $@
-$(TABLE_DIR)/default_cover_uni_avg.json: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/default_cover_uni_avg.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e default -m cover -d uni -f json -t avg > $@
-$(TABLE_DIR)/default_cover_multi_avg.json: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/default_cover_multi_avg.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e default -m cover -d multi -f json -t avg > $@
-$(TABLE_DIR)/default_cover_uni_full.json: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/default_cover_uni_full.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e default -m cover -d uni -f json -t full > $@
-$(TABLE_DIR)/default_f1_uni_full.json: $(SCRIPT_DIR)/make_table.py summaries
+$(TABLE_DIR)/default_f1_uni_full.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e default -m f1 -d uni -f json -t full > $@
@@ -146,7 +149,7 @@ $(TABLE_DIR)/aggregate_table_wide.tex: $(SCRIPT_DIR)/aggregate_table_wide.py \
$(TABLE_DIR)/default_cover_uni_avg.json \
$(TABLE_DIR)/default_cover_multi_avg.json \
$(TABLE_DIR)/default_f1_uni_avg.json \
- $(TABLE_DIR)/default_f1_uni_avg.json
+ $(TABLE_DIR)/default_f1_uni_avg.json | table-dir
python $< \
--bcu $(TABLE_DIR)/best_cover_uni_avg.json \
--bcm $(TABLE_DIR)/best_cover_multi_avg.json \
@@ -159,7 +162,7 @@ $(TABLE_DIR)/aggregate_table_wide.tex: $(SCRIPT_DIR)/aggregate_table_wide.py \
clean_tables:
- rm -f $(TABLE_DIR)/aggregate_table.tex
+ rm -f $(TABLE_DIR)/aggregate_table_wide.tex
rm -f $(TABLE_DIR)/best_cover_combined_full.tex
rm -f $(TABLE_DIR)/best_cover_multi_avg.json
rm -f $(TABLE_DIR)/best_cover_uni_avg.json
@@ -186,6 +189,9 @@ clean_tables:
.PHONY: rankplots
+rank-dir:
+ mkdir -p $(RANK_DIR)
+
rankplots: \
$(RANK_DIR)/rankplot_best_cover_uni.tex \
$(RANK_DIR)/rankplot_best_f1_uni.tex \
@@ -196,19 +202,19 @@ rankplots: \
$(RANK_DIR)/rankplot_default_cover_uni.pdf \
$(RANK_DIR)/rankplot_default_f1_uni.pdf
-$(RANK_DIR)/rankplot_best_cover_uni.tex: $(TABLE_DIR)/best_cover_uni_full.json $(SCRIPT_DIR)/rank_plots.py
+$(RANK_DIR)/rankplot_best_cover_uni.tex: $(TABLE_DIR)/best_cover_uni_full.json $(SCRIPT_DIR)/rank_plots.py | rank-dir
python $(SCRIPT_DIR)/rank_plots.py -i $< -o $@ -b max --type best
-$(RANK_DIR)/rankplot_best_f1_uni.tex: $(TABLE_DIR)/best_f1_uni_full.json $(SCRIPT_DIR)/rank_plots.py
+$(RANK_DIR)/rankplot_best_f1_uni.tex: $(TABLE_DIR)/best_f1_uni_full.json $(SCRIPT_DIR)/rank_plots.py | rank-dir
python $(SCRIPT_DIR)/rank_plots.py -i $< -o $@ -b max --type best
-$(RANK_DIR)/rankplot_default_cover_uni.tex: $(TABLE_DIR)/default_cover_uni_full.json $(SCRIPT_DIR)/rank_plots.py
+$(RANK_DIR)/rankplot_default_cover_uni.tex: $(TABLE_DIR)/default_cover_uni_full.json $(SCRIPT_DIR)/rank_plots.py | rank-dir
python $(SCRIPT_DIR)/rank_plots.py -i $< -o $@ -b max --type default
-$(RANK_DIR)/rankplot_default_f1_uni.tex: $(TABLE_DIR)/default_f1_uni_full.json $(SCRIPT_DIR)/rank_plots.py
+$(RANK_DIR)/rankplot_default_f1_uni.tex: $(TABLE_DIR)/default_f1_uni_full.json $(SCRIPT_DIR)/rank_plots.py | rank-dir
python $(SCRIPT_DIR)/rank_plots.py -i $< -o $@ -b max --type default
-$(RANK_DIR)/rankplot_%.pdf: $(RANK_DIR)/rankplot_%.tex
+$(RANK_DIR)/rankplot_%.pdf: $(RANK_DIR)/rankplot_%.tex | rank-dir
latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode --shell-escape" \
-outdir=$(RANK_DIR) $<
cd $(RANK_DIR) && latexmk -c
@@ -228,28 +234,30 @@ clean_rankplots:
.PHONY: constants
-CONSTANT_TARGETS = \
- $(CONST_DIR)/sigtest_global_best_cover_uni.tex \
+CONSTANT_TARGETS = $(CONST_DIR)/sigtest_global_best_cover_uni.tex \
$(CONST_DIR)/sigtest_global_best_f1_uni.tex \
$(CONST_DIR)/sigtest_global_default_cover_uni.tex \
$(CONST_DIR)/sigtest_global_default_f1_uni.tex
+const-dir:
+ mkdir -p $(CONST_DIR)
+
constants: $(CONSTANT_TARGETS)
$(CONST_DIR)/sigtest_global_best_cover_uni.tex: $(TABLE_DIR)/best_cover_uni_full.json \
- $(SCRIPT_DIR)/significance.py
+ $(SCRIPT_DIR)/significance.py | const-dir
python $(SCRIPT_DIR)/significance.py -i $< -o $@ --type best --mode global
$(CONST_DIR)/sigtest_global_best_f1_uni.tex: $(TABLE_DIR)/best_f1_uni_full.json \
- $(SCRIPT_DIR)/significance.py
+ $(SCRIPT_DIR)/significance.py | const-dir
python $(SCRIPT_DIR)/significance.py -i $< -o $@ --type best --mode global
$(CONST_DIR)/sigtest_global_default_cover_uni.tex: $(TABLE_DIR)/default_cover_uni_full.json \
- $(SCRIPT_DIR)/significance.py
+ $(SCRIPT_DIR)/significance.py | const-dir
python $(SCRIPT_DIR)/significance.py -i $< -o $@ --type best --mode global
$(CONST_DIR)/sigtest_global_default_f1_uni.tex: $(TABLE_DIR)/default_f1_uni_full.json \
- $(SCRIPT_DIR)/significance.py
+ $(SCRIPT_DIR)/significance.py | const-dir
python $(SCRIPT_DIR)/significance.py -i $< -o $@ --type best --mode global
clean_constants: