-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheval.sh
75 lines (70 loc) · 2.35 KB
/
eval.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
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
export CUDA_VISIBLE_DEVICES=0
. ./prepare.sh
EXP_NAME=clothppo
CHECKPOINT_DIR="./models/"
TASK="multi-longsleeve-eval"
CHECKPOINT_PREFIX="ClothPPO"
START_INDEX=42
END_INDEX=42
if [ "$1" = "clothppo" ]; then
CHECKPOINT_PATH="${CHECKPOINT_DIR}ClothPPO.pth"
NAME="${TASK}-clothppo"
python cloth_funnels/run_ppo.py \
name="${NAME}" \
load="${CHECKPOINT_PATH}" \
eval_tasks="./assets/tasks/${TASK}.hdf5" \
eval=True \
num_processes=5 \
episode_length=10 \
fold_finish=False \
dump_visualizations=True \
ray_local_mode=False \
gui=False \
resume=False \
wandb=disabled \
action_primitives='[place]' \
test_dataset_size=200
python cloth_funnels/environment/visualize.py ./*experiments/*${NAME}/replay_buffer.hdf5 n
elif [ "$1" = "best" ]; then
CHECKPOINT_PATH="${CHECKPOINT_DIR}best_policy.pth"
NAME="${TASK}-${EXP_NAME}-best"
python cloth_funnels/run_ppo.py \
name="${NAME}" \
load="${CHECKPOINT_PATH}" \
eval_tasks="./assets/tasks/${TASK}.hdf5" \
eval=True \
num_processes=5 \
episode_length=10 \
fold_finish=False \
dump_visualizations=False \
ray_local_mode=False \
gui=False \
resume=False \
wandb=disabled \
action_primitives='[place]' \
log_dir="./all_experiments/" \
test_dataset_size=200
python cloth_funnels/environment/visualize.py ./*experiments/*${NAME}/replay_buffer.hdf5 n
else
for ((i=$START_INDEX; i>=$END_INDEX; i--)); do
CHECKPOINT_PATH="${CHECKPOINT_DIR}${CHECKPOINT_PREFIX}${i}.pth"
NAME="${TASK}-${EXP_NAME}-${CHECKPOINT_PREFIX}${i}"
python cloth_funnels/run_ppo.py \
name="${NAME}" \
load="${CHECKPOINT_PATH}" \
eval_tasks="./assets/tasks/${TASK}.hdf5" \
eval=True \
num_processes=5 \
episode_length=10 \
fold_finish=False \
dump_visualizations=False \
ray_local_mode=False \
gui=False \
resume=False \
wandb=disabled \
action_primitives='[place]' \
log_dir="./all_experiments/" \
test_dataset_size=100
python cloth_funnels/environment/visualize.py ./*experiments/*${NAME}/replay_buffer.hdf5 n
done
fi