Errors during Sagemaker aws Batch Transform Jobs Logs

0

Hi

Im trying to test a ensemble model created with AWS Sagemaker Autopilot

Past a un seen data frame from S3 to AWS Sagemaker Inference Batch Transform Jobsd in .csv format, that weighs 4.4 MB which is less than the 6 MB limit, it does not contain Nan or inf values, the feature names try to pass them using only lower cases and with its original names with the same error in both cases.

Important to mention that did not used DataWrangler.

On the next lines and the attach screen shot the errors.

What’s is wrong? How can I fix it? Im only trying to classify a series of features to see the performance of the model on a new data frame and its been terrible complex.

Errors:

2023-09-25T15:45:45.552:[sagemaker logs]: MaxConcurrentTransforms=1, MaxPayloadInMB=6, BatchStrategy=MULTI_RECORD 2023-09-25T15:45:46.962:[sagemaker logs]: eurusd5min/Validatin_5bar_V2.csv: Bad HTTP status received from algorithm: 500 2023-09-25T15:45:46.963:[sagemaker logs]: eurusd5min/Validatin_5bar_V2.csv: 2023-09-25T15:45:46.963:[sagemaker logs]: eurusd5min/Validatin_5bar_V2.csv: Message: 2023-09-25T15:45:46.964:[sagemaker logs]: eurusd5min/Validatin_5bar_V2.csv: 'NoneType' object has no attribute 'lower' 2023-09-25T15:45:46.964:[sagemaker logs]: eurusd5min/Validatin_5bar_V2.csv: Traceback (most recent call last): 2023-09-25T15:45:46.965:[sagemaker logs]: eurusd5min/Validatin_5bar_V2.csv: File "/usr/local/lib/python3.8/dist-packages/sagemaker_inference/transformer.py", line 128, in transform 2023-09-25T15:45:46.965:[sagemaker logs]: eurusd5min/Validatin_5bar_V2.csv: result = self._transform_fn(self._model, input_data, content_type, accept) 2023-09-25T15:45:46.966:[sagemaker logs]: eurusd5min/Validatin_5bar_V2.csv: File "/opt/ml/model/code/tabular_serve.py", line 50, in transform_fn 2023-09-25T15:45:46.966:[sagemaker logs]: eurusd5min/Validatin_5bar_V2.csv: if input_content_type.lower() == TEXT_CSV: 2023-09-25T15:45:46.967:[sagemaker logs]: eurusd5min/Validatin_5bar_V2.csv: AttributeError: 'NoneType' object has no attribute 'lower'

Logs Fail Job

1 Answer
0

Hello,

I understand that you are getting errors during batch transformation jobs and would like to gather more information on the same.

I would like to mention that this is generally observed when there is a row entry that has "None" which cannot be casted as a string, so I would recommend that you please replace where there is a None or Null with an empty string (that is '') and also when the content_type is passed as Empty/None, so I would suggest that you please pass the content_type="text/csv".

I would suggest you please change the contentType to text/csv, i.e., "contentType": "text/csv" as below.


"transformInput": {
"dataSource": {
"s3DataSource": {
"s3DataType": "S3Prefix",
"s3Uri": "s3://Validation.csv"
}
},
"contentType": "text/csv",
"compressionType": "None",
"splitType": "None"
},

Furthermore, I would suggest that the model generated by the job requires that the input data not have a header row, and please also ensure that the input data have the same set of input columns as were used to train the model.

Moreover, you may refer to the AutoGluon batch transforming section here [4], and you will see that there is a script path, "amazon-sagemaker-examples/advanced_functionality/autogluon-tabular-containers/scripts/" from the same repository. The scripts path should help you compare the changes you have made to your own tabular_serve.py file.

I would request that you please refer to the aforementioned documentation once, and please reach out to AWS [4] with the detailed use case so that we can assist you better.

If you have any difficulty verifying any of the above-mentioned points or if you still run into issues, please reach out to AWS Support [4] (Sagemaker) along with your issue or use case in detail, and we would be happy to assist you further.

References:

[1] https://sagemaker.readthedocs.io/en/v2.31.1/api/inference/transformer.html

[2] https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/content_types.py

[3] https://github.com/aws/amazon-sagemaker-examples/blob/main/advanced_functionality/autogluon-tabular-containers/AutoGluon_Tabular_SageMaker_Containers.ipynb

[4] Creating support cases and case management - https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#creating-a-support-casehttps://docs.aws.amazon.com/awssupport/latest/user/case-management.html#creating-a-support-case

AWS
answered 7 months ago

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