Model Monitor Capture data - EndpointOutput Encoding is BASE64

0

https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-data-capture-endpoint.html

I have followed the steps mentioned in this and it appears I cannot change the encoding for EndpointOutput in datacapture file. It's coming BASE64 for xgboost model. I am using latest version 1.2.3.

For monitor scheduler it required both EndpointOutput and EndpointInput to have the same encoding. My EndpointInput is CSV but EndpointOutput is coming to be BASE64 and nothing can change it.

This is causing issue while run of analyzer. After baseline is generated and data is captured, when monitoring schedule runs the analyzer it throws error of Encoding mismatch. For it to run EndpointOutput and EndpointInput should have same encoding.

I saw we cannot do anything to change the encoding of output. I used LightGBM, CatBoost algorithms also and found for these EndpointOuput encoding is JSON, which is readable but still not solving the purpose.

Is there a way we can change EndpointOutput Encoding for DataCapture.

  • This is causing issue while run of analyzer. After baseline is generated and data is captured, when monitoring schedule runs the analyzer it throws error of Encoding mismatch. For it to run EndpointOutput and EndpointInput should have same encoding.

    I saw we cannot do anything to change the encoding of output. I used LightGBM, CatBoost algorithms also and found for these EndpointOuput encoding is JSON, which is readable but still not solving the purpose.

    Is there a way we can change EndpointOutput Encoding for DataCapture.

1 Answer
0
Accepted Answer

Output encoding can be configured by using the CaptureContentTypeHeader in EndpointConfig.DataCaptureConfig. I believe since this is not being set, default encoding i.e. base64 is being used.

Please try once with this attribute set as below:

"CaptureContentTypeHeader": { 
         "CsvContentTypes": [ "text/csv" ]
      }

Assuming that content_type/accept is "text_csv" for the concerned model.

AWS
answered a year 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