src/sagemaker_xgboost_container/serving.py
def default_input_fn(input_data, content_type):
    """Take request data and de-serializes the data into an object for prediction.
        When an InvokeEndpoint operation is made against an Endpoint running SageMaker model server,
        the model server receives two pieces of information:
            - The request Content-Type, for example "application/json"
            - The request data, which is at most 5 MB (5 * 1024 * 1024 bytes) in size.
        The input_fn is responsible to take the request data and pre-process it before prediction.
        Note: For CSV data, the decoder will error if there are any leading or trailing newline
        chars.
    Args:
        input_data (obj): the request data.
        content_type (str): the request Content-Type.
    Returns:
        (obj): data ready for prediction. For XGBoost, this defaults to DMatrix.
    """
    return xgb_encoders.decode(input_data, content_type)
Take request data and de-serializes the data into an object for prediction.
        When an InvokeEndpoint operation is made against an Endpoint running SageMaker model server,
        the model server receives two pieces of information:
            - The request Content-Type, for example "application/json"
            - The request data, which is at most 5 MB (5 * 1024 * 1024 bytes) in size.
        The input_fn is responsible to take the request data and pre-process it before prediction.
        Note: For CSV data, the decoder will error if there are any leading or trailing newline
        chars.
    Args:
        input_data (obj): the request data.
        content_type (str): the request Content-Type.
    Returns:
        (obj): data ready for prediction. For XGBoost, this defaults to DMatrix.
    
Take request data and de-serializes the data into an object for prediction.
When an InvokeEndpoint operation is made against an Endpoint running SageMaker model server,
the model server receives two pieces of information:
The request Content-Type, for example "application/json"
The request data, which is at most 5 MB (5 * 1024 * 1024 bytes) in size.
The input_fn is responsible to take the request data and pre-process it before prediction.
Note: For CSV data, the decoder will error if there are any leading or trailing newline
chars.
Take request data and de - serializes the data into an object for prediction . When an InvokeEndpoint operation is made against an Endpoint running SageMaker model server the model server receives two pieces of information : The request Content - Type for example " application / json " The request data which is at most 5 MB ( 5 * 1024 * 1024 bytes ) in size . The input_fn is responsible to take the request data and pre - process it before prediction . Note : For CSV data the decoder will error if there are any leading or trailing newline chars .
def default_input_fn(input_data, content_type):
    return xgb_encoders.decode(input_data, content_type)
def default_input_fn ( input_data , content_type ) : return xgb_encoders . decode ( input_data , content_type )
Take request data and de-serializes the data into an object for prediction.
Take request data and de - serializes the data into an object for prediction .
"""Take request data and de-serializes the data into an object for prediction.
        When an InvokeEndpoint operation is made against an Endpoint running SageMaker model server,
        the model server receives two pieces of information:
            - The request Content-Type, for example "application/json"
            - The request data, which is at most 5 MB (5 * 1024 * 1024 bytes) in size.
        The input_fn is responsible to take the request data and pre-process it before prediction.
        Note: For CSV data, the decoder will error if there are any leading or trailing newline
        chars.
    Args:
        input_data (obj): the request data.
        content_type (str): the request Content-Type.
    Returns:
        (obj): data ready for prediction. For XGBoost, this defaults to DMatrix.
    """
data ready for prediction. For XGBoost, this defaults to DMatrix.
data ready for prediction . For XGBoost this defaults to DMatrix .
(obj)
input_data
the request data.
the request data .
content_type
the request Content-Type.
the request Content - Type .