yizhongw / Tk-Instruct

Tk-Instruct is a Transformer model that is tuned to solve many NLP tasks by following instructions.
https://arxiv.org/abs/2204.07705
MIT License
177 stars 27 forks source link

How to debug deepspeed in vscode? #13

Closed RenzeLou closed 1 year ago

RenzeLou commented 2 years ago

Dear authors,

I run the scripts/train_tk_instruct.sh successfully, but I don't know how to debug your code with deepspeed in the vscode.

For example, you use the command deepspeed --master_port $port src/run_s2s.py **args, but how can we implement it in the launch.json of vscode?

I tried to write the launch.json like below:

{   "cwd": "/home/xxx/code/project/",
    "env": {"CUDA_VISIBLE_DEVICES":"7",
            "CUDA_DEVICE_ORDER":"PCI_BUS_ID",
            "TRANSFORMERS_CACHE":"/home/xxx/.cache/huggingface"}, 
    "name": "deepspeed",
    //"type": "python",
    "type": "deepspeed",   // there is no supported interpreter for deepspeed
    "request": "launch",
    "program": "${file}",
    "console": "integratedTerminal",
    "justMyCode": false,
    "args": [
        "--master_port","10086",
        "--do_train",
        "--do_predict",
        "--predict_with_generate"
    ]
}

But it doesn't work due to there is no supported interpreter for deepspeed in the vscode.