Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to debug the PPO2 algorithm with VSCode #739

Closed
davidhopper2003 opened this issue Nov 29, 2018 · 2 comments
Closed

Unable to debug the PPO2 algorithm with VSCode #739

davidhopper2003 opened this issue Nov 29, 2018 · 2 comments

Comments

@davidhopper2003
Copy link

davidhopper2003 commented Nov 29, 2018

I used VSCode to debug the PPO2 algorithm. When debugging to line 58 of the file baselines/common/vec_env/subproc_vec_env.py:

observation_space, action_space = self.remotes[0].recv()

the program has no response and the debugging process cannot continue (As shown below).
ppo2_debug_1
ppo2_debug_2
ppo2_debug_3

My configuration file .vscode/launch.json is shown as follows:

{

    // 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: Module",

            "type": "python",

            "request": "launch",

            "module": "baselines.run",

            "console": "integratedTerminal",

            "args": [

                "--alg",

                "ppo2",

                "--env",

                "PongNoFrameskip-v4",

                "--num_timesteps",

                "2e7",

                "--save_path",

                "~/models/pong_20M_ppo2"

            ],

        },

        {

            "name": "Python: Current File (Integrated Terminal)",

            "type": "python",

            "request": "launch",

            "program": "${workspaceFolder}/baselines/run.py",

            "console": "integratedTerminal", 

            "args": [

                "--alg",

                "ppo2",

                "--env",

                "PongNoFrameskip-v4",

                "--num_timesteps",

                "2e7",

                "--save_path",

                "~/models/pong_20M_ppo2"

            ],

        }

    ]

}

When I used the command line

python -m baselines.run --alg=ppo2 --env=PongNoFrameskip-v4 --num_timesteps=2e7 --save_path=~/models/pong_20M_ppo2

to run the program in a terminal, there is no problem.

Any helpful suggestions will be highly appreciated. Thank you.

@davidhopper2003
Copy link
Author

davidhopper2003 commented Nov 30, 2018

The problem has been solved. See another issue I wrote: Unable to debug an OpenAI baselines pipeline task #1058.

@pzhokhov
Copy link
Collaborator

Let me close this and move discussion to the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants