【发布时间】:2021-09-16 07:26:31
【问题描述】:
我正在尝试对 AWS Sagemaker 中的模型运行模型监控。监控作业因“编码不匹配失败:endpointInput 编码为 JSON,endpointOutput 编码为 base64。我们目前仅支持相同类型的输入和输出编码。”
endpointInput 的编码是 JSON,endpointOutput 的编码是 base64,但输入和输出的预期都是 json。
我尝试在 DataCaptureConfig 中使用 json_content_types,但 endpointOutput 仍然是 base64 编码。
下面是我在部署中使用的 DataCaptureConfig:
data_capture_config=DataCaptureConfig(
enable_capture = True,
sampling_percentage=100,
json_content_types = 'application/json',
destination_s3_uri=MY_BUCKET)
我从模型中捕获的文件如下所示:
{
"captureData": {
"endpointInput": {
"observedContentType": "application/json",
"mode": "INPUT",
"data": "{ === json data ===}",
"encoding": "JSON"
},
"endpointOutput": {
"observedContentType": "*/*",
"mode": "OUTPUT",
"data": "{====base 64 encoded output ===}",
"encoding": "BASE64"
}
},
"eventMetadata": {
=== some metadata ===
}
我观察到输出内容类型未被识别为 json/应用程序。 所以我需要一个解决方法/程序来获得 json 编码形式的输出。 请帮助获取输入和输出数据的 JSON 编码。
类似的问题报告了here,但没有响应。
【问题讨论】:
标签: amazon-web-services machine-learning monitoring amazon-sagemaker