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.

已提問 3 年前檢視次數 880 次
1 個回答
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!

已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南