in 5-Monitoring/config/inference.py [0:0]
def input_fn(request_body, request_content_type):
"""
The SageMaker XGBoost model server receives the request data body and the content type,
and invokes the `input_fn`.
The input_fn that just validates request_content_type and prints
"""
print("Hello from the PRE-processing function!!!")
if request_content_type == "text/csv":
return xgb_encoders.csv_to_dmatrix(request_body)
else:
raise ValueError(
"Content type {} is not supported.".format(request_content_type)
)