我的终端中不断出现错误:
ConnectionRefusedError: [Errno 111] Connection refused
我尝试添加此命令时出现上述错误:
accelerate launch --num_processes=1 --num_machines=1 --mixed_precision=fp16 --dynamo_backend=no alpaca.py
我的调试命令如下:
cd /its/home/ar810/Project2 ; /usr/bin/env /its/home/ar810/Project2/.venv/bin/python /its/home/ar810/.vscode-server/extensions/ms-python.debugpy-2024.10.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 45401 accelerate launch --num_processes=1 --num_machines=1 --mixed_precision=fp16 --dynamo_backend=no -- /its/home/msu22/Project2/1.DataGeneration/1.1PromptGeneration/alpaca.py
尝试在 vs code debug 上运行我的加速器启动以节省时间。
Nvm 我想通了:
我将此配置添加到我的 launch.json 中:-
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"module": "accelerate.commands.launch",
"args": [
"__REPLACE__WITH__YOUR__FILE__PATH",
"--num_processes=1",
"--num_machines=1",
"--mixed_precision=fp16",
"--dynamo_backend=no",
],
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
我为此参考了文档:
注意事项