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
I have been testing this toolkit, trying to do some custom stuff when I got this error message.
Issue
1717449617113,"2024-06-03T21:20:13,924 [INFO ] W-model-2-stdout com.amazonaws.ml.mms.wlm.WorkerLifeCycle - mms.service.PredictionException: model_fn() takes 1 positional argument but 2 were given : 400"
I was following the readme and overloaded the model_fn(model_dir). I had no idea, that this function could get multiple inputs, looking into the original handler implementation I figured that there might be a
I was able to fix it by adding a new parameter to the function - def model_fn(model_dir, temp=None):.
It was a bit confusing, as the documentation reads as there was only 1 argument.
Is this general that the model_fn takes 2 arguments or it just happened in my particular case?
Thanks!
The text was updated successfully, but these errors were encountered:
Hello Everyone,
I have been testing this toolkit, trying to do some custom stuff when I got this error message.
Issue
1717449617113,"2024-06-03T21:20:13,924 [INFO ] W-model-2-stdout com.amazonaws.ml.mms.wlm.WorkerLifeCycle - mms.service.PredictionException: model_fn() takes 1 positional argument but 2 were given : 400"
I was following the readme and overloaded the
model_fn(model_dir)
. I had no idea, that this function could get multiple inputs, looking into the original handler implementation I figured that there might be aMy inference code
Logs
Solution
I was able to fix it by adding a new parameter to the function -
def model_fn(model_dir, temp=None):
.It was a bit confusing, as the documentation reads as there was only 1 argument.
Is this general that the
model_fn
takes 2 arguments or it just happened in my particular case?Thanks!
The text was updated successfully, but these errors were encountered: