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

MemoryError #1

Closed
marooncn opened this issue Feb 8, 2018 · 1 comment
Closed

MemoryError #1

marooncn opened this issue Feb 8, 2018 · 1 comment

Comments

@marooncn
Copy link

marooncn commented Feb 8, 2018

When I run the code rlrobot.run() , there is something wrong with the following information

Task Wander_12Ks_25a 12500 states 25 actions
Connected to Robot
wander_12k_TOSL_QBIASSR
Traceback (most recent call last):
File "", line 1, in
File "/home/maroon/RL-ROBOT/rlrobot.py", line 109, in run
lp.setup() # Learning process setup
File "/home/maroon/RL-ROBOT/lp.py", line 65, in setup
agent.setup()
File "/home/maroon/RL-ROBOT/agent.py", line 109, in setup
action_selection.setup()
File "/home/maroon/RL-ROBOT/action_selection.py", line 32, in setup
action_qbiassr.setup()
File "/home/maroon/RL-ROBOT/action_qbiassr.py", line 53, in setup
index = np.full(([n_states, n_inputs, n_states]), -1, dtype=np.int)
File "/home/maroon/.local/lib/python3.5/site-packages/numpy/core/numeric.py", line 298, in full
a = empty(shape, dtype, order)
MemoryError

Is this a common problem and what should I do?

@angelmtenor
Copy link
Owner

angelmtenor commented Feb 8, 2018

Yes, it's a problem when learning a task with too many states in a system with not enough memory. Wander 12K has 12500 states, requiring more than 7GB RAM when preprocessing the QBIASSR algorithm at the beginning (not detected in 16GB system). You should try tasks with fewer states.

To solve this issue I added some code to check if the system runs out of memory. I also changed the default task back to Wander-1K.

Tested in 4GB system.

Thanks!

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