-
Notifications
You must be signed in to change notification settings - Fork 0
/
002_bipedalwaker.sh
53 lines (40 loc) · 1.65 KB
/
002_bipedalwaker.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
#!/bin/bash
#SBATCH --array=0-4
#SBATCH --partition alldlc_gpu-rtx2080
#SBATCH --job-name CMbRL_indra
#SBATCH --output logs/slurm/%x-%A-%a-HelloCluster.out
#SBATCH --error logs/slurm/%x-%A-%a-HelloCluster.err
#SBATCH --mem 32GB
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=32
#SBATCH --ntasks-per-core=1
#SBATCH --gres=gpu:1
echo "Workingdir: $PWD";
echo "Started at $(date)";
source ~/miniconda3/bin/activate # Adjust to your path of Miniconda installation
conda activate c_mbrl
start=`date +%s`
tasks=("carl_box2d_bipedal_walker")
seeds=("0" "42" "1337" "13" "71")
schemes=("enc_img_ctx_dec_img_ctx")
contexts=("double_box")
n_tasks=${#tasks[@]}
n_seeds=${#seeds[@]}
n_schemes=${#schemes[@]}
n_contexts=${#contexts[@]}
task_index=$((${SLURM_ARRAY_TASK_ID} / (n_seeds * n_schemes * n_contexts) % n_tasks))
seed_index=$((${SLURM_ARRAY_TASK_ID} / (n_schemes * n_contexts) % n_seeds))
scheme_index=$((${SLURM_ARRAY_TASK_ID} / n_contexts % n_schemes))
context_index=$((${SLURM_ARRAY_TASK_ID} % n_contexts))
task=${tasks[$task_index]}
seed=${seeds[$seed_index]}
scheme=${schemes[$scheme_index]}
context=${contexts[$context_index]}
group_name="${task}_${context}_${scheme}_normalized"
python -m contextual_mbrl.dreamer.train --configs carl $scheme --task $task --env.carl.context $context --seed $seed --logdir logs/$group_name/$seed --wandb.group $group_name --jax.policy_devices 0 --jax.train_devices 0 --run.steps 500000 --wandb.project ""
python -m contextual_mbrl.dreamer.eval --logdir logs/$group_name/$seed
python -m contextual_mbrl.dreamer.record_latents --logdir logs/$group_name/$seed
end=`date +%s`
runtime=$((end-start))
echo Job execution complete.
echo Runtime: $runtime