-
Notifications
You must be signed in to change notification settings - Fork 20
/
run_training_with_partial_data.sh
35 lines (29 loc) · 1.26 KB
/
run_training_with_partial_data.sh
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
#!/bin/bash
OAI_SRC=/media/lext/FAST/OA_progression_project/Data/
OAI_MOST_IMG_SRC=/media/lext/FAST/OA_progression_project/Data/MOST_OAI_00_0_2
WRKDIR=/media/lext/FAST/OA_progression_project/workdir
mkdir -p $WRKDIR/torch_models
docker build -t oaprog_img .
for N_SAMPLES in 400 800 1600 3200;
do
nvidia-docker run -it --name oa_prog_training --rm \
-v $WRKDIR:/workdir/:rw \
-v $OAI_MOST_IMG_SRC:/data/:ro \
-v $WRKDIR/torch_models:/root/.torch/models/ --ipc=host \
oaprog_img python -u run_training.py \
--snapshots /workdir/snapshots \
--subsample_train $N_SAMPLES \
--logs /workdir/logs \
--dataset_root /data/ \
--metadata_root /workdir/Metadata \
--n_epochs 20
SNAPSHOT=$(ls -td $WRKDIR/snapshots/* | head -1 | rev |cut -d/ -f1 | rev)
nvidia-docker run -it --name oa_prog_evaluation --rm \
-v $WRKDIR:/workdir/:rw \
-v $OAI_MOST_IMG_SRC:/data/:ro --ipc=host \
oaprog_img python -u run_dl_evaluation.py --snapshots /workdir/snapshots \
--snapshot $SNAPSHOT \
--dataset_root /data/ \
--save_dir /workdir/snapshots/$SNAPSHOT/test_inference \
--metadata_root /workdir/Metadata
done;