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

Run time Error when run quickstart.py #825

Open
Charles-Lim93 opened this issue Dec 1, 2023 · 1 comment · May be fixed by #831
Open

Run time Error when run quickstart.py #825

Charles-Lim93 opened this issue Dec 1, 2023 · 1 comment · May be fixed by #831
Labels
bug Something isn't working

Comments

@Charles-Lim93
Copy link

Charles-Lim93 commented Dec 1, 2023

When run examples/quickstart.py, i'm getting error with

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper_CUDA_gather)

it seems that when running imitation code (Behavior Cloning in this example), default mode is in several GPUs. If not it seems data conversion problem in tensor.

==>I solved it by changing bc.py's init function's device setting from auto to cpu. but still getting error (warning sign);

python3.10/site-packages/stable_baselines3/common/vec_env/base_vec_env.py:243: UserWarning: You tried to call render() but no render_mode was passed to the env constructor.
warnings.warn("You tried to call render() but no render_mode was passed to the env constructor."

Does any have same issues? or know solution?

Thank you in advanced

Environment

  • OS:Ubuntu 22.04
  • Python version: 3.10
  • Cuda : 11.8 - 12.0
@Charles-Lim93 Charles-Lim93 added the bug Something isn't working label Dec 1, 2023
@ernestum
Copy link
Collaborator

Thanks for reporting this.

See #823 for the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants