Skip to content

Run time Error when run quickstart.py #825

@Charles-Lim93

Description

@Charles-Lim93

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions