-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_doge.sh
66 lines (62 loc) · 1.94 KB
/
run_doge.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
#!/usr/bin/env bash
TRAIN_STEPS=1000000
BM_NAME='d4rl'
DATA_SOURCE='mujoco'
ALPHA_LIST1='hopper_medium-v2 hopper_medium_replay-v2 hopper_random-v2 halfcheetah_random-v2 walker2d_random-v2'
#ALPHA_LIST2='antmaze_umaze-v2 antmze_umaze_diverse-v2 antmaze_medium_diverse-v2 antmaze_medium_play-v2 antmaze_large_play-v2 antmaze_large_diverse-v2'
# shellcheck disable=SC1061
# shellcheck disable=SC1073
#for STD in 0.2 0.3; do
for ENV_U in 'Hopper' 'Walker2d'; do
ENV=$ENV_U'-v2'
#for DATA_TYPE in 'medium-v2' 'medium_replay-v2' 'medium_expert-v2' 'random-v2'; do
#for DATA_TYPE in 'medium-v2' 'medium_replay-v2'; do
DATA=${ENV_U,,}'_'$DATA_TYPE
DIR='data/d4rl/mujoco/'
DATA1=$DIR${ENV_U,,}'_medium_expert-v2'
RATIO1=0.1
DATA2=$DIR${ENV_U,,}'_random-v2'
RATIO2=1
# shellcheck disable=SC2199
# shellcheck disable=SC2076
if [[ "${ALPHA_LIST1[@]}" =~ "$DATA" ]]; then
alpha=17.5
else
alpha=7.5
fi
if [[ "$DATA" =~ "antmaze" ]]; then
lr_distance=0.0001
initial_lambda=1
train_d_steps=1000000
else
lr_distance=0.001
initial_lambda=5
train_d_steps=100000
fi
for SEED in 30 40; do
GPU_DEVICE=0
CUDA_VISIBLE_DEVICES=$GPU_DEVICE python demo_data_mix.py \
--train.agent_ckpt_name='221109-data_mix/me0.1_r1' \
--model.model_name='doge' \
--model.doge.hyper_params.alpha=$alpha \
--model.doge.hyper_params.initial_lambda=$initial_lambda\
--model.doge.hyper_params.train_d_steps=$train_d_steps\
--model.doge.hyper_params.optimizers.distance[1]=$lr_distance\
--train.batch_size=256 \
--env.external.benchmark_name=$BM_NAME \
--env.external.env_name=$ENV \
--env.external.data_source=$DATA_SOURCE \
--env.external.state_normalize=True \
--env.external.score_normalize=True \
--train.total_train_steps=$TRAIN_STEPS \
--train.seed=$SEED \
--train.wandb.entity='d2c' \
--train.wandb.project='data_mix' \
--train.wandb.name='doge-'$ENV_U'-me0.1_r1-seed'$SEED \
--data1=$DATA1 \
--ratio1=$RATIO1 \
--data2=$DATA2 \
--ratio2=$RATIO2 &
sleep 2
done
done