You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def model_fn(model_dir):
processor = DataProcess() # A class that contains logic for processing each file.
return processor
def predict_fn(data, model):
text = model.process_file(data)
return {"output": text}
The input data is a base64 string of a file content.
It's strange that when the file is pretty small, under 1MB, the server runs model_fn and predict_fn once, and the process took around 30 seconds. But when I inputted large file of around 1.5MB, it runs model_fn and predict_fn multiple times, each time lasting around 2mins. I know this because the same request gives multiple contents of
[INFO ] W-model-1-stdout com.amazonaws.ml.mms.wlm.WorkerLifeCycle - Preprocess time - 5.128383636474609 ms
[INFO ] W-model-1-stdout com.amazonaws.ml.mms.wlm.WorkerLifeCycle - Predict time - 162199.17178153992 ms
[INFO ] W-model-1-stdout com.amazonaws.ml.mms.wlm.WorkerLifeCycle - Postprocess time - 0.00762939453125 ms
It's probably unorthodox to use the server for the data processing job. But what configs did I miss?
Uh oh!
There was an error while loading. Please reload this page.
I used
The custom script was
The input
data
is a base64 string of a file content.It's strange that when the file is pretty small, under 1MB, the server runs
model_fn
andpredict_fn
once, and the process took around 30 seconds. But when I inputted large file of around 1.5MB, it runsmodel_fn
andpredict_fn
multiple times, each time lasting around 2mins. I know this because the same request gives multiple contents ofIt's probably unorthodox to use the server for the data processing job. But what configs did I miss?
Related: aws/amazon-sagemaker-examples#1073
The text was updated successfully, but these errors were encountered: