Reputation: 177
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?
Upvotes: 7
Views: 16576
Reputation: 492
I had the same issue and contacted AWS customer service to increase the instance.
Upvotes: 0
Reputation: 2157
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. I.E. use a ml.t3.medium
or ml.t3.large
.
Upvotes: 8