src/sagemaker_xgboost_container/handler_service.py
def default_input_fn(self, 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.
            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.
            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.
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 .
def default_input_fn(self, input_data, content_type):
            return xgb_encoders.decode(input_data, content_type)
def default_input_fn ( self , 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.
            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)
self
input_data
the request data.
the request data .
content_type
the request Content-Type.
the request Content - Type .