Configuring launch.json in vscode

"configurations": [
            "name": "Python: my tod training",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "args": [

Running Debug Session

open and press F5 to start a debug session using the configuration shown above.

bug report: initial bug report

initial bug console report


adding breakpoint on line 458 of, and use F11:Step into to dig into the situation.

It says that forward() function meets an unexpected argument relating to variable ‘label’. Comparing values of ‘label’ in different env: CPU CUDA

Following an answer on stackoverflow, change the argument name from “masked_lm_labels” to “labels”. It solved the TypeError problem. But the training process would be killed unexpectedly without warning or any log information.