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

Out of memory error during training #36

Open
aadeshnpn opened this issue Sep 11, 2018 · 2 comments
Open

Out of memory error during training #36

aadeshnpn opened this issue Sep 11, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@aadeshnpn
Copy link

I started training the algorithm for SuperMarioBros. I tried it on Desktop and Laptop with Nvidia GPU and 16 GB of RAM. On both machines, the training scripts exits after the RAM is full.

@Kautenja
Copy link
Owner

Ah, this is to be expected as the default DeepQAgent initializes a replay queue of 750,000 states. This requires ~39GB of RAM to execute. Changing the 40th line of train.py from

agent = DeepQAgent(env, replay_memory_size=int(7.5e5))

to

agent = DeepQAgent(env, replay_memory_size=int(2.5e5))

should fix your problem. Otherwise I'd suggest finding a powerful server with 64GB+ RAM and at least a GTX1070 to run training sessions on.

In the near future I'll update:

  1. the CLI to support passing training parameters in without editing code files
  2. init of DeepQAgent to raise an error if the replay queue will exceed the amount of memory on the machine

@aadeshnpn
Copy link
Author

Thanks @Kautenja.

@Kautenja Kautenja changed the title Training falied with 16GB RAM Out of memory error during training Jan 5, 2019
@Kautenja Kautenja self-assigned this Jan 5, 2019
@Kautenja Kautenja added the enhancement New feature or request label Jan 5, 2019
@Kautenja Kautenja removed their assignment Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants