src/sagemaker_xgboost_container/serving.py
def default_output_fn(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:
        (worker.Response): a Flask response object with the following args:
            * Args:
                response: the serialized data to return
                accept: the content-type that the data was transformed to.
    """
    return worker.Response(encoders.encode(prediction, accept), mimetype=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:
        (worker.Response): a Flask response object with the following args:
            * Args:
                response: the serialized data to return
                accept: the content-type that the data was transformed to.
    
Function responsible to serialize the prediction for the response.
Function responsible to serialize the prediction for the response .
def default_output_fn(prediction, accept):
    return worker.Response(encoders.encode(prediction, accept), mimetype=accept)
def default_output_fn ( prediction , accept ) : return worker . Response ( encoders . encode ( prediction , accept ) , mimetype = accept )
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:
        (worker.Response): a Flask response object with the following args:
            * Args:
                response: the serialized data to return
                accept: the content-type that the data was transformed to.
    """
a Flask response object with the following args:
Args:
response: the serialized data to return
accept: the content-type that the data was transformed to.
a Flask response object with the following args : Args : response : the serialized data to return accept : the content - type that the data was transformed to .
(worker.Response)
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 .