-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Describe the bug
When trying to deploy my Huggingface model through:
predictor = huggingface_model.deploy(
endpoint_name = endpoint_name,
serverless_inference_config = {
"MemorySizeInMB": 1024,
"MaxConcurrency": 2,
}
)
I get the following error:
File "/XXX/lib/python3.9/site-packages/sagemaker/huggingface/model.py", line 271, in deploy
if not self.image_uri and instance_type.startswith("ml.inf"):
AttributeError: 'NoneType' object has no attribute 'startswith'
I think this is because Huggingface deploy currently assumes that an instance type is given (not ready for it being serverless). In the serverless case instance_type
is None
, but it uses string methods on instance_type
here:
if not self.image_uri and instance_type.startswith("ml.inf"): |
Maybe a simple not is_serverless and
at the start of this if statement would fix this? Or am I being dense?
Thanks!