src/sagemaker_xgboost_container/algorithm_mode/handler_service.py
def default_input_fn(self, input_data, input_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.
                input_content_type (str): the request Content-Type. XGBoost accepts CSV, LIBSVM, and RECORDIO-PROTOBUF.
            Returns:
                (obj): data ready for prediction. For XGBoost, this defaults to DMatrix.
            """
            if len(input_data) == 0:
                raise NoContentInferenceError()
            dtest, content_type = serve_utils.parse_content_data(input_data, input_content_type)
            return dtest, 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.
                input_content_type (str): the request Content-Type. XGBoost accepts CSV, LIBSVM, and RECORDIO-PROTOBUF.
            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, input_content_type):
            if len(input_data) == 0:
                raise NoContentInferenceError()
            dtest, content_type = serve_utils.parse_content_data(input_data, input_content_type)
            return dtest, content_type
def default_input_fn ( self , input_data , input_content_type ) : if len ( input_data ) == 0 : raise NoContentInferenceError ( ) dtest , content_type = serve_utils . parse_content_data ( input_data , input_content_type ) return dtest , 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.
                input_content_type (str): the request Content-Type. XGBoost accepts CSV, LIBSVM, and RECORDIO-PROTOBUF.
            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 .
input_content_type
the request Content-Type. XGBoost accepts CSV, LIBSVM, and RECORDIO-PROTOBUF.
the request Content - Type . XGBoost accepts CSV LIBSVM and RECORDIO - PROTOBUF .