src/sagemaker_xgboost_container/handler_service.py
def default_output_fn(self, prediction, accept):
            """Function responsible to serialize the prediction for the response.
            Args:
                prediction (obj): prediction returned by predict_fn .
                accept (str): accept content-type expected by the client.
            Returns:
                encoded response for MMS to return to client
            """
            encoded_prediction = encoders.encode(prediction, accept)
            if accept == content_types.CSV:
                encoded_prediction = encoded_prediction.encode("utf-8")

            return encoded_prediction
Function responsible to serialize the prediction for the response.
            Args:
                prediction (obj): prediction returned by predict_fn .
                accept (str): accept content-type expected by the client.
            Returns:
                encoded response for MMS to return to client
            
Function responsible to serialize the prediction for the response.
Function responsible to serialize the prediction for the response .
def default_output_fn(self, prediction, accept):
            encoded_prediction = encoders.encode(prediction, accept)
            if accept == content_types.CSV:
                encoded_prediction = encoded_prediction.encode("utf-8")
            return encoded_prediction
def default_output_fn ( self , prediction , accept ) : encoded_prediction = encoders . encode ( prediction , accept ) if accept == content_types . CSV : encoded_prediction = encoded_prediction . encode ( "utf-8" ) return encoded_prediction
Function responsible to serialize the prediction for the response.
Function responsible to serialize the prediction for the response .
"""Function responsible to serialize the prediction for the response.
            Args:
                prediction (obj): prediction returned by predict_fn .
                accept (str): accept content-type expected by the client.
            Returns:
                encoded response for MMS to return to client
            """
encoded response for MMS to return to client
encoded response for MMS to return to client
self
prediction
prediction returned by predict_fn .
prediction returned by predict_fn .
accept
accept content-type expected by the client.
accept content - type expected by the client .