Closed YEKAI-2022 closed 8 months ago
我本机是单机单卡的,像这种debug出现并行问题该怎么解决,
Hello @YEKAI-2022. For training our module on a single GPU, the recommended command is:
python -m torch.distributed.launch --nproc_per_node=1 main.py --cfg <path-to-config-file> --data-path <imagenet-path> --output <output-path>
Upon reviewing the screenshot you shared, it appears that the command you are currently using is functionally equivalent to:
python main.py --cfg <path-to-config-file> --data-path <imagenet-path> --output <output-path>
If your objective is solely to debug the model, consider creating a new script where you can load the model without executing the main.py
.
torch.distributed.launch --nproc_per_node=1如果debug的话,上述的参数也要和--cfg
@YEKAI-2022 You can refer to sections 3.2 and 3.3 of this blog. It's important to note that these settings are not exclusive to our project and can be found online.
Thank you very much for your answer
你好,我在本机debug代码时,出现并行的问题local_rank和world_size,是参数设置有错误吗?