1

Keep getting the error in my terminal:

ConnectionRefusedError: [Errno 111] Connection refused

I got the above error by trying to add in this command:

accelerate launch --num_processes=1 --num_machines=1 --mixed_precision=fp16 --dynamo_backend=no alpaca.py

to my debugging command as so:

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 

tried running my accelerator launch on vs code debug to save time.

1 Answer 1

2

Nvm i figured it out:

I added this configuration to my 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"
        }
    ]
}


I refered the documentation for this:

enter link description here

Things to Note

  1. BTW you have to module before the args in launch.json
  2. Copy your ABSOLUTE PATH and not RELATIVE PATH
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.