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

Steady Memory Increase When Running Example #1099

Closed
danieldugas opened this issue Mar 12, 2021 · 2 comments
Closed

Steady Memory Increase When Running Example #1099

danieldugas opened this issue Mar 12, 2021 · 2 comments

Comments

@danieldugas
Copy link

Describe the bug
similar to #716, the memory increases steadily until the process is killed. In this case, when running the SAC example from the documentation with an image-based env (here, CarRacing for example) and CnnPolicy

memleak

Code example

import gym
import numpy as np

from stable_baselines.sac.policies import CnnPolicy
from stable_baselines import SAC

env = gym.make('CarRacing-v0')

model = SAC(CnnPolicy, env, verbose=1)
model.learn(total_timesteps=1000000, log_interval=1)

System Info
I initially thought that it was a dependency version issue, but having installed the same versions as mentioned in this comment #716 (comment), the problem persists.
that is:
Ubuntu 18.04
Python 3.6.9 (not conda)
Tensorflow 1.14.0
Numpy 1.18.1

stable baselines is on 2.10.0

I have tried several other dependency versions (numpy 1.19, tensorflow 1.13.2, etc..) with no luck so far.

@araffin
Copy link
Collaborator

araffin commented Mar 12, 2021

v (here, CarRacing for example) and CnnPolicy

CarRacing is known to have a memory leak... and you should use master version of gym (see openai/gym#2062)

Do it happens with another image based env?

Anyway, I would highly recommend you to switch to Stable-Baselines3 if possible: https://github.com/DLR-RM/stable-baselines3

@danieldugas
Copy link
Author

Not seeing the same issue with stable-baselines3, thank you. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants