-
Notifications
You must be signed in to change notification settings - Fork 3
/
train_dqn.sh
33 lines (26 loc) · 1023 Bytes
/
train_dqn.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
#!/bin/sh
seed_max=1
log_level="NOTICE"
export DEBUG=1
export TRAIN=1
export EVAL=0
scenario="RANDOM"
accelerate=1200 # 1 step = 0.02 * 1200 = 24 s
n_training_threads=2
n_rollout_threads=2
num_env_steps=$((25200 * 40)) # steps_per_episode * episodes
experiment="check"
algo="dqn"
gamma=0.99
lr=3e-4
w_qos=30
w_xqos=0.005
log_interval=1
wandb_user="tcai7"
wandb_api_key="e3662fa8db0f243936c7514a1d0c69f2374ce721"
echo "algo is ${algo}, traffic scenario is ${scenario}, max seed is ${seed_max}"
for seed in `seq ${seed_max}`;
do
echo "seed is ${seed}:"
CUDA_VISIBLE_DEVICES=0 python train.py --algorithm_name ${algo} --experiment_name ${experiment} --scenario ${scenario} --accelerate ${accelerate} --seed ${seed} --n_training_threads ${n_training_threads} --n_rollout_threads ${n_rollout_threads} --num_env_steps ${num_env_steps} --gamma ${gamma} --learning-rate ${lr} --user_name ${wandb_user} --log_level ${log_level} --log_interval ${log_interval} --w_qos ${w_qos} --w_xqos ${w_xqos} --use_wandb $@
done