-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Bug] Use of gym.make() stops "rollout/" data from being printed #232
Comments
Hello, This is not a bug, you need to wrap your environment using a |
Thank you very much for your quick reply. I'm sorry I missed the need for the monitor wrapper. The example at hill-a/stable-baselines#24 it very useful to show how it is applied. My example above does what I want if I use: import gym
from stable_baselines3 import SAC
from stable_baselines3.common.monitor import Monitor
env = gym.make('Pendulum-v0')
env = Monitor(env)
model = SAC('MlpPolicy', env, verbose = 1)
model.learn(200, log_interval = 1) The output is now:
It appears that a number of people have tripped up on the same thing. If there had been a message along the lines of
I would probably have worked it out myself and not taken your time by submitting this issue as a bug. |
I think this is a good suggestion that could be included: Monitor is indeed a bit of a quirk but heavily depended on by SB3, so any clarity of its use would be nice to see. |
fair enough, I think we can in fact wrap it automatically, since we have |
🐛 Bug
If
gym.make
is used to define the environment the rollout data is not printed.To Reproduce
Example where
gym.make()
is used:Output is missing the
rollout/
data:Expected behavior
Example where
gym.make()
is not used:Output includes the
rollout/
data:System Info
Describe the characteristic of your environment:
The text was updated successfully, but these errors were encountered: