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
car_racing.py memory leaking issue #2062
Comments
Thanks a lot. This fixed the leak issue. @Jaekyung-Cho I guess it would be great if you could submit a pull request for this. |
Hello, I've experienced the same memory leak and applied the solution given by @Jaekyung-Cho. Could you share your results for the following code? I see constant increase in ram usage. import gym
import psutil
import os
def memory_used():
return psutil.Process(os.getpid()).memory_info().rss * 1e-6 # To megabyte
e = gym.make('CarRacing-v0')
e.unwrapped.verbose = 0
for i in range(10000000):
e.reset()
if i % 1000 == 0:
print('Ram Used: %f' % memory_used()) which outputs (numbers are megabyte)
looking for a solution, would you be so kind to tell me if you are able to reproduce the issue? |
I also got same result. In my case, I didn't run car_racing module more than 24 hours. And that's why I didn't care about this RAM memory leaking. Anyway, thank you for notice me and I try to solve it!!! |
pull request about issue openai#2062 (car_racing.py memory leaking issue )
…sue ) (openai#2096) * car_racing.py memory leaking issue openai#2062 solving * additional memory leaking resolve
gym/gym/envs/box2d/car_racing.py
Line 527 in 38a1f63
There is memory leaking in car_racing.py code.
pyglet.graphics.vertex_list() function makes the memory almost double,
And it can be fixed with
vl.delete()
under this linegym/gym/envs/box2d/car_racing.py
Line 530 in 38a1f63
The text was updated successfully, but these errors were encountered: