collie.utils.setup_distribution¶
- setup_distribution(config)[源代码]¶
设置分布式环境。
可以支持多机情况下的分布式训练:
launch from torchrun eg:
torchrun --standalone --nproc_per_node=8 train.pylaunch from slurm eg.
srun --partition=xxx --gres=gpu:8 --ntasks=8 --ntasks-per-node=8 --job-name=xxx --kill-on-bad-exit=1 train.py
- 参数:
config –
CollieConfig有关分布式并行的策略配置- 返回类型:
None