"FileNotFoundError: [Errno 2] No such file or directory: '/opt/ml/input/data/training/train/data.csv'

0

I want to run sagemaker and I adjusted my code according to the following example:

step 3: https://docs.aws.amazon.com/sagemaker/latest/dg/ex1-preprocess-data.html

and

step 4: https://docs.aws.amazon.com/sagemaker/latest/dg/ex1-train-model.html

but I can't finish the training. Sagemaker returns the following error:

ErrorMessage "FileNotFoundError: [Errno 2] No such file or directory: '/opt/ml/input/data/training/train/data.csv

To upload data on s3, in my code I set the paths as follows:

bucket = sagemaker_session.default_bucket() prefix = 'sagemaker_forecasting_ml'

train_1d.to_csv('train_1d.csv', sep=',', index=False, header=False) boto3.Session().resource('s3').Bucket(bucket).Object(os.path.join(prefix, 'data/train_1d.csv')).upload_file('train_1d.csv')

training_1d_s3_path = TrainingInput( "s3://{}/{}/{}".format(bucket, prefix, "data/train.csv"), content_type="csv" )

Why sagemaker can't find a path when data is on it?

질문됨 2년 전364회 조회
1개 답변
1

Hi! Looks like you are uploading a file called "train_1d.csv" and then requesting a file with a different name called "train.csv". Might this be the error? Hope it helps.

AWS
Dani M
답변함 2년 전
  • Hey, did this work for you? Remember to accept the answer if it has helped you (^_^)

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠