AWS Sagemaker unable to parse csv
Asked Answered
R

3

7

I'm trying to run a training job on AWS Sagemaker, but it keeps failing giving the following error:

ClientError: Unable to parse csv: rows 1-5000, file /opt/ml/input/data/train/KMeans_data.csv

I've selected 'text/csv' as the content type and my CSV file contains 5 columns with numerical content and text headers.

Can anyone point out what could be going wrong here?

Thanks!

Reservation answered 1/8, 2018 at 14:28 Comment(2)
could you post a snippet of what the CSV looks like, and the method that you're using to to load and parse the file?Dock
do you have a numeric label in your first column?Bioplasm
R
10

From https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-training.html CSV must not have headers:

Amazon SageMaker requires that a CSV file doesn't have a header record ...

Try removing the header row.

Reserpine answered 2/8, 2018 at 18:0 Comment(1)
Just came here to say that if you have only 1 feature column (2 columns total), SageMaker doesn't like that eitherAkira
R
0

Try to make sure that there are no other files other than the training file in the training folder in S3 bucket.

Rudd answered 2/4, 2020 at 0:13 Comment(0)
B
0

Make sure to not have any new lines in the cells of .csv file.

Boycie answered 18/7, 2023 at 19:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.