notebooks icon indicating copy to clipboard operation
notebooks copied to clipboard

SageMaker samples return error on SageMaker Notebook Instances

Open la-cruche opened this issue 4 years ago • 3 comments

Hi,

those 2 samples don't work anymore on SageMaker Notebook instances

  1. https://github.com/huggingface/notebooks/tree/master/sagemaker/01_getting_started_pytorch
  2. https://github.com/huggingface/notebooks/tree/master/sagemaker/06_sagemaker_metrics

import botocore
from datasets.filesystems import S3FileSystem

s3 = S3FileSystem()  

# save train_dataset to s3
training_input_path = f's3://{sess.default_bucket()}/{s3_prefix}/train'
train_dataset.save_to_disk(training_input_path,fs=s3)

# save test_dataset to s3
test_input_path = f's3://{sess.default_bucket()}/{s3_prefix}/test'
test_dataset.save_to_disk(test_input_path,fs=s3)

returns NoCredentialsError: Unable to locate credentials when ran as-is. This was not the case previously.

la-cruche avatar Mar 15 '22 14:03 la-cruche

Do you know if SageMaker changed something on how they provide credentials?

philschmid avatar Mar 15 '22 14:03 philschmid

I just started a notebook instance and ran the 01_getting_started_pytorch without any issues.

philschmid avatar Mar 15 '22 14:03 philschmid

Had the same issue last week, restarted the notebook kernel and it worked again ... Wasn't able to reproduce the issue afterwards :/

heiko-hotz avatar Mar 15 '22 15:03 heiko-hotz