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

Memory usage increases while running DQN.py #80

Open
Zherui-Liu opened this issue Jul 3, 2019 · 2 comments
Open

Memory usage increases while running DQN.py #80

Zherui-Liu opened this issue Jul 3, 2019 · 2 comments

Comments

@Zherui-Liu
Copy link

The memory usage is constantly increasing. My computer is 16G memory, but I can't complete the step=10**5 training. Is there any way to solve the problem that the memory will increase during the training?

image
image
image
image
image

The above is the change of memory usage when I run. When the current memory usage reaches 70%, the agent will show "missed 7 ~ 9 observations(s)".

image

And when I try to use "memory-profiler" to monitor memory changes, it shows that the agent.act_and_train() method in marlo\experiments\train_agent.py continues to increase memory usage as the loop progresses, but never releases it.

I don't know if anyone has tried to solve this problem. THANKS~

@spMohanty
Copy link
Member

@AndKram : Any idea ?

@Zherui-Liu
Copy link
Author

I've tried to probe every variable in this function, but I was quickly fainted and it was difficult to know exactly which variable was consuming more memory.

So, I am now trying to batch training, similar to training 10000 step per time, then save the model, extract the model, and restart the training. According to my observation, the model or the agent after re-extracting is not effective at the beginning, but it will recover soon to the previous level and continue to learn.

hope this will be ok...

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