In sagemaker jupyter notebook I run the following code to load data from an s3 bucket.
import boto3
import pandas as pd
from sagemaker import get_execution_role
role = get_execution_role()
bucket='bucketname'
data_key = 'filename'
data_location = 's3://{}/{}'.format(bucket, data_key)
data=pd.read_csv(data_location)
Then the kernel dies and I get a pop up saying "The kernel appears to have died. It will restart automatically."
Is there an easy way to load the data from s3 in sagemaker?
It's most likely you created a notebook with too small of an instance. Most do ml.t2.medium
for demos, but might need ml.t2.large
or higher.
Remember that the t2
is the second generation and it's guaranteed by AWS that further generations ( t3
) are at least as cost efficient as the prior generation. IE use a ml.t3.medium
or ml.t3.large
.
I had the same issue and contacted AWS customer service to increase the instance.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.