How to set YAML file to train on multi-gpus

Hi,
I seted the YAML files like this:
world_size: 4
gpu_ranks: [0 1 2 3]

but when I tried to train, I got this error:
onmt_train: error: argument --gpu_ranks/-gpu_ranks: invalid int value: ‘0 1 2 3’

I had set:
export CUDA_VISIBLE_DEVICES=0,1,2,3

Thanks advance!

try gpu_ranks: [0,1,2,3]

1 Like

Thanks a lot! It works!