-
Notifications
You must be signed in to change notification settings - Fork 1
/
train_all.sh
executable file
·52 lines (47 loc) · 1.57 KB
/
train_all.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
#!/bin/bash
expr_name=$1
use_wandb="False" # Replace this with True if you want to use wandb
wandb_project="project"
wandb_entity="username"
# Training data collecting policy with IMPALA
printf "n" | ./train.sh crafter run $expr_name \
use_crafter_monitor=True \
total_steps=2e8 \
wandb=$use_wandb \
project=$wandb_project \
entity=$wandb_entity \
group=run
echo Data collecting policy done.
run_savedir=`python read_results.py savedir`
#
printf "n" | ./train.sh crafter pred $expr_name \
actor_load_dir="$run_savedir/checkpoint.tar" \
total_steps=0.5e8 \
contrast_step_limit=1e6 \
wandb=$use_wandb \
project=$wandb_project \
entity=$wandb_entity \
group=pred
echo Achievement learning done.
pred_savedir=`python read_results.py savedir`
printf "n" | ./train.sh crafter clustering $expr_name \
actor_load_dir="$run_savedir/checkpoint.tar" \
pred_model_load_dir="$pred_savedir/checkpoint.tar"
echo Achievement clustering done.
cluster_savedir=`python read_results.py savedir`
num_clusters=`python read_results.py num_clusters`
printf "n" | ./train.sh crafter mo $expr_name \
num_objectives=$num_clusters \
cluster_load_dir="$cluster_savedir/cluster.data" \
cluster_pred_model_load_dir="$pred_savedir" \
causal_graph_load_path="$cluster_savedir/graph.data" \
include_new_tasks=True \
use_crafter_monitor=True \
total_steps=3e8 \
wandb=$use_wandb \
project=$wandb_project \
entity=$wandb_entity \
group=mo
echo Sub-policy training done.
mo_savedir=`python read_results.py savedir`
echo $mo_savedir