pytorch-cpp-rl icon indicating copy to clipboard operation
pytorch-cpp-rl copied to clipboard

Reinforcement Learning works, but not the visualization

Open ga74kud opened this issue 5 years ago • 2 comments

Hi, thank you for the program. I get from the server side following Render not defined.

Render not defined for <baselines.common.vec_env.subproc_vec_env.SubprocVecEnv object at 0x7f99daea02b0> Render not defined for <baselines.common.vec_env.subproc_vec_env.SubprocVecEnv object at 0x7f99daea02b0>

I also tried a simple example that worked:

import gym import time env = gym.make('CartPole-v0') env.reset() for _ in range(1000): env.render() env.step(env.action_space.sample()) #take a random action time.sleep(0.03) env.close()

I tried several environments, not only CartPole-v0

I also tried to set the env_id on the server side def make_env(env_id, seed, rank): def _thunk(): env = gym.make(env_id)

I hope someone can help with that problem.

best, Michael

ga74kud avatar Jan 15 '20 23:01 ga74kud

@ga74kud I got the same issue, did you ever find a solution?

JesperLindberg avatar Feb 18 '20 18:02 JesperLindberg

Perhaps a recent version of gym removed rendering on SubProcEnvs? I'll take a look when I get time.

Omegastick avatar Feb 18 '20 18:02 Omegastick