-
Notifications
You must be signed in to change notification settings - Fork 4
/
run.sh
executable file
·36 lines (32 loc) · 1.02 KB
/
run.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
#!/bin/bash
num=$1
remark=$2
others=$3
BS=256
exp=example_darts_nas
if [ $num -le 1 ]
then
{
echo "python run.py experiment=$exp.yaml logger.wandb.name=g${num}_bs${BS}_${remark} trainer.gpus=${num} datamodule.batch_size=${BS} ${others}"
python -m ipdb run.py \
experiment=$exp.yaml \
logger.wandb.name=g${num}_bs${BS}_${remark} \
trainer.gpus=${num} \
datamodule.batch_size=${BS} \
logger.wandb.offline=True \
$others
}
else
{
echo "python run.py experiment=$exp.yaml logger.wandb.name=ddp_g${num}_bs${BS}_${remark} trainer.gpus=${num} trainer.accelerator=ddp datamodule.batch_size=${BS} ${others}"
python run.py \
experiment=$exp.yaml \
logger.wandb.name=ddp_g${num}_bs${BS}_${remark} \
trainer.gpus=${num} \
trainer.accelerator=ddp \
datamodule.batch_size=${BS} \
logger.wandb.offline=True \
$others
}
# mpirun -np ${num} python run.py experiment=$exp.yaml logger.wandb.name=ddp_g${num} trainer.gpus=1 trainer.accelerator=horovod
fi