Sagemaker Transformer

0

Hi, I've constructed a pipeline using Scikit-Learn on SageMaker, incorporating data transformations and a Random Forest model, then I use the hyperparameter tuner to find the best model.

I can unpack and load the best model and use it to do a prediction.

As I would like to move the model to production, I am trying to do a batch transformation.

sklearn_model = SKLearnModel(model_data='s3://BUCKET/PATH/model.tar.gz',
                             role=role,
                             framework_version='1.2-1',
                             py_version='py3')

transformer = sklearn_model.transformer(instance_count=1, 
                                        instance_type='ml.m5.large',
                                        output_path='s3://BUCKET/PATH/prediction/')

transformer.transform(data='s3://BUCKET/PATH/input/test.csv',
                      content_type='text/csv',
                      split_type='Line')

However, I consistently encounter this error: AttributeError: 'NoneType' object has no attribute 'startswith'. What might be causing this issue?

Thanks,

Mat

asked a month ago93 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions