how does input_fn, predict_fn and output_fn work in aws sagemaker script mode?

0

i am trying to understand how input_fn, predict_fn and outout_fn work? I am able to understand what they are, but I am not able to understand how they are called (invoked), can anyone help me understand the same

1 réponse
1

Hi,

Take a look at this implementation using scikit_learn

They are all implemented as part of the HandlerService object.

  • input_fn for preprocessing when data comes in
  • predict_fn for making a prediction
  • output_fn for postprocessing

Generally, input_fn and output_fn have default implementations provided by SageMaker, but predict_fn does not.

AWS
répondu il y a 2 ans
  • Hi, thanks for the answer, so it means model_fn needs to be mandatorily implemented (overriden) and we can ignore overriding/defining input_fn, predict_fn and output_fn methods while writing entry point script?

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions