嘉渊
2023-07-27 d5c818131bfee99c01c0b6cf7888a0bd6aceefca
update
1个文件已修改
12 ■■■■■ 已修改文件
funasr/bin/build_trainer.py 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/bin/build_trainer.py
@@ -532,11 +532,9 @@
    args = build_args(args, parser, extra_task_params)
    if args.local_rank is not None:
        args.distributed = True
        args.simple_ddp = True
        distributed = True
    else:
        args.distributed = False
        args.ngpu = 1
        distributed = False
    args.local_rank = args.local_rank if args.local_rank is not None else 0
    local_rank = args.local_rank
    if "CUDA_VISIBLE_DEVICES" in os.environ.keys():
@@ -593,6 +591,12 @@
    args.batch_type = "length"
    args.oss_bucket = None
    args.input_size = None
    if distributed:
        args.distributed = True
        args.simple_ddp = True
    else:
        args.distributed = False
        args.ngpu = 1
    if optim is not None:
        args.optim = optim
    if lr is not None: