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 Antwort
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
beantwortet vor 2 Jahren
  • 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?

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen