Skip to content

Commit 20cc333

Browse files
author
Matt Crane
committed
Cleaned up some scripts
1 parent a1955f9 commit 20cc333

File tree

6 files changed

+34
-6
lines changed

6 files changed

+34
-6
lines changed

build_network_version.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

gpu.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Assumes that versions has been done first to build snapbug/qqa:sha-cf0e269
4+
5+
nvidia-docker run -itd --name gpu snapbug/qqa:sha-cf0e269 python main.py model.gpu --paper-ext-feats --num_threads=1 --cuda
6+
nvidia-docker run -itd --name gpu.nocudnn snapbug/qqa:sha-cf0e269 python main.py model.gpu.nocudnn --paper-ext-feats --num_threads=1 --cuda --nocudnn
7+
8+
nvidia-docker wait gpu gpu.nocudnn
9+
10+
nvidia-docker logs gpu > gpu.log
11+
nvidia-docker cp gpu:/castorini/castor/sm_cnn/model.gpu .
12+
nvidia-docker rm gpu
13+
14+
nvidia-docker logs gpu.nocudnn > gpu.nocudnn.log
15+
nvidia-docker cp gpu.nocudnn:/castorini/castor/sm_cnn/model.gpu.nocudnn .
16+
nvidia-docker rm gpu.nocudnn

idf_baseline.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
cd /castorini/data/TrecQA
4+
python parse.py
5+
python overlap_features.py
6+
python build_vocab.py
7+
python build_qrels.py
8+
9+
cd /castorini/castor/idf_baseline
10+
python qa-data-only-idf.py ../../data/TrecQA TrecQA
11+
12+
../sm_cnn/trec_eval-8.0/trec_eval ../../data/TrecQA/raw-test.qrel TrecQA.raw-test.idfsim

run_network_version.sh renamed to network_version.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/sh
22

3+
for SHA in $( git -C ~/castorini/castor/sm_cnn/ log --pretty=%h __init__.py model.py main.py train.py utils.py )
4+
do
5+
nvidia-docker build -t snapbug/qqa:sha-${SHA} --build-arg sha=${SHA} .
6+
done
7+
38
for SHA in $( git -C ~/castorini/castor/sm_cnn/ log --pretty=%h __init__.py model.py main.py train.py utils.py )
49
do
510
# Train the model

run_seeds.sh renamed to seeds.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ reps=0
66
while [ ${reps} -lt 200 ]
77
do
88
seed=$(( RANDOM ))
9+
910
if [ ! -f model.cpu.seed.${seed}.log ]
1011
then
1112
echo ${seed} runs
File renamed without changes.

0 commit comments

Comments
 (0)