imitation icon indicating copy to clipboard operation
imitation copied to clipboard

Run time Error when run quickstart.py

Open Charles-Lim93 opened this issue 2 years ago • 1 comments

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 avatar Dec 01 '23 11:12 Charles-Lim93

Thanks for reporting this.

See #823 for the warning.

ernestum avatar Dec 11 '23 13:12 ernestum