I\'ve successfully trained a LDA model with sagemaker, I\'ve been able to set up an Inference API but it has a limit of how many records I can query at a time.
I need t
While the Batch Transform platform supports flexible payload limits (via MaxPayloadInMB
), many algorithms set more strict internal limits. This is true for the SageMaker built-in LDA algorithm which rejects "large" requests according to its internal configuration.
The error you see in the log says exactly this: the Batch Transform client attempted to send a request as large as 20MB, but the LDA algorithm server rejected the request with error code 413 (Request Entity Too Large)
.
When using a SageMaker built-in algorithm container, or any container that is not your own, we recommend leaving the parameter MaxPayloadInMB
unset in your CreateTransformJob
request. This will prompt the platform to choose the algorithm's default execution parameters, which you will see printed in your log like so:
[sagemaker logs]: MaxConcurrentTransforms=1, MaxPayloadInMB=${DEFAULT_MAX_PAYLOAD_IN_MB}, BatchStrategy=MultiRecord
For more insight on how these "execution parameters" are resolved, see the "order of precedence" documented here.
Aside from controlling payload size, your other transform job parameter choices (SplitType=RecordIO
and BatchStrategy=MultiRecord
) look correct for passing RecordIO-Protobuf data.
I managed to resolve the issue, it seemed the maxpayload I was using was too high. I set MaxPayloadInMB=1
and it now runs like a dream