deploy to sagemkaer cannot predict

#17
by Enning - opened

When i try to deploy this model into sagemaker using the code provided, the endpoint can be created but when i try to predict, i got this error from cloudwatch:

KeyError: 'musicgen'

Traceback (most recent call last):
File "/opt/conda/lib/python3.9/site-packages/sagemaker_huggingface_inference_toolkit/handler_service.py", line 219, in handle
self.initialize(context)
File "/opt/conda/lib/python3.9/site-packages/sagemaker_huggingface_inference_toolkit/handler_service.py", line 104, in load
hf_pipeline = get_pipeline(task=os.environ["HF_TASK"], model_dir=model_dir, device=self.device)
File "/opt/conda/lib/python3.9/site-packages/transformers/pipelines/init.py", line 675, in pipeline
config = AutoConfig.from_pretrained(model, _from_pipeline=task, **hub_kwargs, **model_kwargs)
File "/opt/conda/lib/python3.9/site-packages/transformers/models/auto/configuration_auto.py", line 873, in from_pretrained
config_class = CONFIG_MAPPING[config_dict["model_type"]]
File "/opt/conda/lib/python3.9/site-packages/transformers/models/auto/configuration_auto.py", line 579, in getitem
raise KeyError(key)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/conda/lib/python3.9/site-packages/mms/service.py", line 108, in predict
ret = self._entry_point(input_batch, self.context)
File "/opt/conda/lib/python3.9/site-packages/sagemaker_huggingface_inference_toolkit/handler_service.py", line 243, in handle
raise PredictionException(str(e), 400)
mms.service.PredictionException: 'musicgen' : 400

Sign up or log in to comment