in src/sagemaker_huggingface_inference_toolkit/handler_service.py [0:0]
def get_device(self):
"""
The get device function will return the device for the DL Framework.
"""
if _is_gpu_available():
return int(self.context.system_properties.get("gpu_id"))
else:
return -1