Skip to content

Commit 914906d

Browse files
committed
Initial pass at new testing functionality
1 parent 641af7f commit 914906d

33 files changed

+99
-8
lines changed

Pilot1/Attn/test.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
set -x
12
python attn_baseline_keras2.py
2-
# python attn_abstention_keras2.py --epochs 1
3+
python attn_abstention_keras2.py --epochs 1
34
python attn_bin_working_jan7_h5.py --in ../../Data/Pilot1/top_21_1fold_001.h5 --ep 1 --save_dir "./save"

Pilot1/Combo/test.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/bin/bash
22

3+
set -x
4+
35
python combo_baseline_keras2.py --use_landmark_genes True --warmup_lr True --reduce_lr True -z 256 --epochs 4
4-
python infer.py --sample_set NCIPDM --drug_set ALMANAC --use_landmark_genes -m ./save/combo.A=relu.B=256.E=10.O=adam.LR=None.CF=e.DF=d.wu_lr.re_lr.L1000.D1=1000.D2=1000.D3=1000.model.h5 -w ./save/combo.A=relu.B=256.E=10.O=adam.LR=None.CF=e.DF=d.wu_lr.re_lr.L1000.D1=1000.D2=1000.D3=1000.weights.h5
6+
python infer.py --sample_set NCIPDM --drug_set ALMANAC --use_landmark_genes -m ./save/combo.A=relu.B=256.E=4.O=adam.LR=None.CF=e.DF=d.wu_lr.re_lr.L1000.D1=1000.D2=1000.D3=1000.model.h5 -w ./save/combo.A=relu.B=256.E=4.O=adam.LR=None.CF=e.DF=d.wu_lr.re_lr.L1000.D1=1000.D2=1000.D3=1000.weights.h5
57

68
# Need to revisit combo_dose.py and infer_dose.py
79
# python combo_dose.py --use_landmark_genes True -z 256

Pilot1/NT3/nt3_candle_wrappers_baseline_keras2.py

-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ def load_data(train_path, test_path, gParameters):
7272

7373
def run(gParameters):
7474

75-
print('Params:', gParameters)
76-
7775
file_train = gParameters['train_data']
7876
file_test = gParameters['test_data']
7977
url = gParameters['data_url']

Pilot1/NT3/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
set -x
4+
35
python nt3_baseline_keras2.py -e 2
46
# python nt3_baseline_keras2_tensorrt.py -e 2
57
python nt3_abstention_keras2.py -e 2

Pilot1/P1B1/test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set -x
12
python p1b1_baseline_keras2.py --use_landmark_genes True --train_samples 100 --epochs 5

Pilot1/P1B2/test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set -x
12
python p1b2_baseline_keras2.py --epochs 3

Pilot1/P1B3/test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
set -x
12
python p1b3_baseline_keras2.py --feature_subsample 500 -e 5 --train_steps 100 --val_steps 10 --test_steps 10
23
python p1b3_baseline_keras2.py --conf p1b3_conv_model.txt -e 5 --train_steps 100 --val_steps 10 --test_steps 10

Pilot1/T29/test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
./prep.sh
2+
set -x
23
python t29res.py -e 5
34
python infer.py --model t29res.model.json --weights t29res.model.h5 --n_pred 10

Pilot1/TC1/test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
set -x
12
python tc1_baseline_keras2.py -e 2
23
python tc1_baseline_keras2.py --conf tc1_modac_model.txt -e 2

Pilot1/Uno/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
set -x
4+
35
# AUC prediction model
46
if [ ! -f "top_21_auc_1fold.uno.h5" ]; then
57
curl -o top_21_auc_1fold.uno.h5 http://ftp.mcs.anl.gov/pub/candle/public/benchmarks/Pilot1/uno/top_21_auc_1fold.uno.h5

Pilot1/UnoMT/test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set -x
12
python unoMT_baseline_pytorch.py --epochs 3 --resp_val_start_epoch 2

Pilot1/Uno_UQ/test.sh

Whitespace-only changes.

Pilot1/Uno_UQ_old/test.sh

Whitespace-only changes.

Pilot2/P2B1/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set -x
2+
python p2b1_baseline_keras2.py -e 1

Pilot3/P3B1/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set -x
2+
python p3b1_baseline_keras2.py -e 1

Pilot3/P3B2/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set -x
2+
python p3b2_baseline_keras2.py -e 1

Pilot3/P3B3/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set -x
2+
python p3b3_baseline_keras2.py -e 1

Pilot3/P3B4/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set -x
2+
python p3b4_baseline_tf2.py -e 1

Pilot3/P3B5/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set -x
2+
python p3b5_baseline_pytorch.py -e 1

examples/ADRP/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set -ex
2+
python adrp_baseline_keras2.py -e 1

examples/M16/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set -ex
2+
python m16_baseline_keras2.py

examples/darts/test.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cd uno
2+
set -x
3+
python uno_example.py -e 1

examples/darts/uno/uno_example.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import sys
23

34
import torch
45
import torch.nn as nn
@@ -9,8 +10,11 @@
910
import darts
1011
import candle
1112

12-
logging.basicConfig(level=logging.INFO)
13+
# logging.basicConfig(sys.stdout, level=logging.INFO)
14+
# Set up the logger to go to stdout instead of stderr
1315
logger = logging.getLogger("darts_uno")
16+
logger.setLevel(logging.INFO)
17+
logger.addHandler(logging.StreamHandler(sys.stdout))
1418

1519

1620
def initialize_parameters():

examples/histogen/extract_code_baseline_pytorch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def extract(lmdb_env, loader, model, device):
8282
index = 0
8383

8484
with lmdb_env.begin(write=True) as txn:
85-
pbar = tqdm(loader)
85+
pbar = tqdm(loader, file=sys.stdout)
8686

8787
for img, _, filename in pbar:
8888
img = img.to(device)

examples/histogen/test.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set -ex
2+
python train_vqvae_baseline_pytorch.py -e 1
3+
python extract_code_baseline_pytorch.py
4+
python train_pixelsnail_baseline_pytorch.py -e 1

examples/histogen/train_pixelsnail_baseline_pytorch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def initialize_parameters(default_model='train_pixelsnail_default_model.txt'):
119119

120120

121121
def train(args, epoch, loader, model, optimizer, scheduler, device):
122-
loader = tqdm(loader)
122+
loader = tqdm(loader, file=sys.stdout)
123123

124124
criterion = nn.CrossEntropyLoss()
125125

examples/histogen/train_vqvae_baseline_pytorch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def initialize_parameters(default_model='train_vqvae_default_model.txt'):
9292

9393
def train(epoch, loader, model, optimizer, scheduler, device):
9494
if dist.is_primary():
95-
loader = tqdm(loader)
95+
loader = tqdm(loader, file=sys.stdout)
9696

9797
criterion = nn.MSELoss()
9898

examples/image-vae/test.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set -ex
2+
python image_vae_baseline_pytorch.py -e 1
3+
python sample_baseline_pytorch.py --checkpoint epoch_1.pt

examples/mnist/test.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set -ex
2+
python mnist_cnn_candle.py -e 3
3+
python mnist_mlp_candle.py -e 3

examples/rnagen/test.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set -ex
2+
python rnagen_baseline_keras2.py -e 1
3+
python rnagen_baseline_keras2.py --plot True

examples/rnngen/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set -ex
2+
python infer_rnngen_baseline_pytorch.py

examples/unet/test.sh

Whitespace-only changes.

test.sh

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
3+
export TF_CPP_MIN_LOG_LEVEL=3
4+
set +x
5+
if [ $# == 0 ]; then
6+
for pilot in "Pilot1" "Pilot2" "Pilot3" "examples"
7+
do
8+
for dir in $pilot/*/
9+
do
10+
echo $dir
11+
cd $dir
12+
# more test.sh
13+
./test.sh > test.log
14+
rm test.log
15+
cd ../../
16+
done
17+
done
18+
elif [ $# == 1 ]; then
19+
for dir in $1/*/
20+
do
21+
echo $dir
22+
cd $dir
23+
# more test.sh
24+
./test.sh > test.log
25+
rm test.log
26+
cd ../../
27+
done
28+
elif [ $# == 2 ]; then
29+
for dir in $1/$2/
30+
do
31+
echo $dir
32+
cd $dir
33+
# more test.sh
34+
./test.sh > test.log
35+
rm test.log
36+
cd ../../
37+
done
38+
else
39+
echo "Too many arguments"
40+
echo "With no arguments the script will loop over Pilot1, Pilot2, Pilot3 and examples"
41+
echo "Or you can enter a directory, or a directory and benchmark to test a smaller set"
42+
fi

0 commit comments

Comments
 (0)