背景:用的工具是AWS CloudShell,跟着教程做
但在运行如下命令时报错Invalid base64: "{instances: [{in0:[863],in1:[882]}]}"
aws sagemaker-runtime invoke-endpoint \
--endpoint-name object2vec-2022-10-09-18-06-55-540 \
--body '{"instances": [{"in0":[863],"in1":[882]}]}' \
--content-type application/json \
--accept application/json \
results
解决:加上–cli-binary-format raw-in-base64-out
aws sagemaker-runtime invoke-endpoint \
--endpoint-name object2vec-2022-10-09-18-06-55-540 \
--body '{"instances": [{"in0":[863],"in1":[882]}]}' \
--content-type application/json \
--accept application/json \
--cli-binary-format raw-in-base64-out \
results