fix ddp for incorrect steps (#2915)
* fix ddp for incorrect steps * add test
This commit is contained in:
@@ -115,6 +115,7 @@ def normalize_config(cfg):
|
||||
"chrf",
|
||||
]
|
||||
choose_device(cfg)
|
||||
cfg.ddp = cfg.ddp if cfg.ddp is not None else cfg.world_size != 1
|
||||
if cfg.world_size != 1:
|
||||
cfg.device_map = {"": int(os.environ.get("LOCAL_RANK", 0))}
|
||||
if cfg.fsdp or cfg.fsdp_config or cfg.ddp:
|
||||
|
||||
Reference in New Issue
Block a user