Is it possible to debug a fairseq task with vscode or some other tools?

651 Views Asked by At

I am using fairseq to run a customized task with command line tool fairseq-train ${data} {args}. Is it possible to enter debug mode?

1

There are 1 best solutions below

0
On

Yes. The original command is fairseq-train ${args}. I found this is equivalent to python ${PATH-TO-FAIRSEQ_ROOT}/fairseq_cli/train.py ${args}.

If you know how to debug in VS Code, then just point the "program" parameter to the (absolute) path of fairseq_cli/train.py, and put all arguments after the "args", in the launch.json file.