Sage Maker Notebook - overcommit_memory settings - permission denied

0

I am doing some NLP work using spaCy in a ml.p2.xlarge notebook instance in sagemaker.

However, I get the following error:

numpy.core._exceptions._ArrayMemoryError: Unable to allocate 3.10 GiB for an array with shape (2889884, 288) and data type float32

To fix the issue, I have tried the following commands:

!echo 1 | sudo tee /proc/sys/vm/overcommit_memory
!echo 1 > /proc/sys/vm/overcommit_memory

Neither of them work and they both return:
/bin/sh: /proc/sys/vm/overcommit_memory: Permission denied

Any suggestions? I even added all policies with "admin" in them to the notebook IAM with no luck.

asked 3 years ago853 views
1 Answer
0

Okay, it seems that I needed to restart my notebook after adding the admin policies to it. It's working now and I can overcommit the memory!

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions