geek-ai / MAgent

A Platform for Many-Agent Reinforcement Learning
MIT License
1.68k stars 332 forks source link

MemoryError raised during training train_pursuit.py #23

Closed Shawn-Guo-CN closed 6 years ago

Shawn-Guo-CN commented 6 years ago

I got a MemroyError when I run the example script train_pursuit.py. The traceback is copied as follow,

Process Process-1:
Traceback (most recent call last):
  File "/home/dl/.pyenv/versions/2.7.12/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/home/dl/.pyenv/versions/2.7.12/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/home/dl/Downloads/MAgent-master/python/magent/model.py", line 294, in model_client
    model = RLModel(**model_args)
  File "/home/dl/Downloads/MAgent-master/python/magent/builtin/tf_model/dqn.py", line 143, in __init__
    self.replay_buf_view     = ReplayBuffer(shape=(memory_size,) + self.view_space)
  File "/home/dl/Downloads/MAgent-master/python/magent/builtin/common.py", line 9, in __init__
    self.buffer = np.empty(shape=shape, dtype=dtype)
MemoryError
merrymercy commented 6 years ago

16GB or 32GB is recommended to run this example. Do you have enough memory?

Shawn-Guo-CN commented 6 years ago

oh, I see it.