Closed cslxiao closed 3 years ago
I'm not sure about this as I usually debugged the code with prints.
try CUDA_VISIBLE_DEVICES=1 MASTER_HOST=localhost:1235 python xxxxx.py {args}
Same question as above. How to debug code launched with torchpack in IDE such as VSCode?
Maybe Pdb is what you need:
import pdb; pdb.set_trace()
I did the following to debug my code with torchpack in vscode:
Set breaking points in your code where you wish.
Create the following launch.json file under .vscode folder
In a command line run your torchpack command like you just want to run the code and not debug, i.e.: torchpack dist-run -np 1 python tools/test.py configs/nuscenes/det/transfusion/secfpn/camera+lidar/swint_v0p075/convfuser.yaml pretrained/bevfusion-det.pth --eval bbox
Go to the Run And Debug Window and press the attach button
These steps should allow you to debug your code with torchpack!
How to debug code launched with torchpack in IDE such as VSCode? Thx.