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

已提問 1 個月前檢視次數 95 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南