I have attempted the code on the many posts on how to load a pickle file (1.9GB) from an S3 bucket, but none seem to work for our notebook instance on AWS Sagemaker. Notebook size is 50GB.
Some of the methods attempted:
Method 1
import io
import boto3
client = boto3.client('s3')
bytes_buffer = io.BytesIO()
client.download_fileobj(Bucket=my_bucket, Key=my_key_path, Fileobj=bytes_buffer)
bytes_io.seek(0)
byte_value = pickle.load(bytes_io)
This gives:
Method 2: This actually gets me something back with no error:
client = boto3.client('s3')
bytes_buffer = io.BytesIO()
client.download_fileobj(Bucket=my_bucket, Key=my_key_path, Fileobj=bytes_buffer)
byte_value = bytes_buffer.getvalue()
import sys
sys.getsizeof(byte_value)/(1024**3)
this returns: 1.93
but how do I convert the byte_value into the pickled object? I tried this:
pickled_data = pickle.loads(byte_value)
But the kernel "crashed" - went idle and I lost all variables.
