wav2vec2 failing with error An error occurred (ModelError) when calling the InvokeEndpoint operation: Received client error (413) from primary and could not load the entire response body. #274
ModelError Traceback (most recent call last)
/tmp/ipykernel_16248/2846183179.py in
2 # audio_path = "s3://ml-backend-sales-call-audio/sales-call-audio/1279881599154831602.playback.mp3"
3 audio_path = "/home/ec2-user/SageMaker/finetune-deploy-bert-with-amazon-sagemaker-for-hugging-face/1279881599154831602.playback.mp3" ## AS OF NOW have stored locally in notebook instance
----> 4 res = predictor.predict(data=audio_path)
5 print(res)
~/anaconda3/envs/amazonei_pytorch_latest_p37/lib/python3.7/site-packages/botocore/client.py in _api_call(self, *args, **kwargs)
493 )
494 # The "self" in this scope is referring to the BaseClient.
--> 495 return self._make_api_call(operation_name, kwargs)
496
497 _api_call.name = str(py_operation_name)
Hello,
I am trying to run https://github.com/huggingface/notebooks/blob/main/sagemaker/20_automatic_speech_recognition_inference/sagemaker-notebook.ipynb notebook for speech to audio and it is failing with following error. The CW log does not have much info on this further. Is this something issue with sagemaker sdk version?
`
ModelError Traceback (most recent call last) /tmp/ipykernel_16248/2846183179.py in
2 # audio_path = "s3://ml-backend-sales-call-audio/sales-call-audio/1279881599154831602.playback.mp3"
3 audio_path = "/home/ec2-user/SageMaker/finetune-deploy-bert-with-amazon-sagemaker-for-hugging-face/1279881599154831602.playback.mp3" ## AS OF NOW have stored locally in notebook instance
----> 4 res = predictor.predict(data=audio_path)
5 print(res)
~/anaconda3/envs/amazonei_pytorch_latest_p37/lib/python3.7/site-packages/sagemaker/predictor.py in predict(self, data, initial_args, target_model, target_variant, inference_id) 159 data, initial_args, target_model, target_variant, inference_id 160 ) --> 161 response = self.sagemaker_session.sagemaker_runtime_client.invoke_endpoint(**request_args) 162 return self._handle_response(response) 163
~/anaconda3/envs/amazonei_pytorch_latest_p37/lib/python3.7/site-packages/botocore/client.py in _api_call(self, *args, **kwargs) 493 ) 494 # The "self" in this scope is referring to the BaseClient. --> 495 return self._make_api_call(operation_name, kwargs) 496 497 _api_call.name = str(py_operation_name)
~/anaconda3/envs/amazonei_pytorch_latest_p37/lib/python3.7/site-packages/botocore/client.py in _make_api_call(self, operation_name, api_params) 912 error_code = parsed_response.get("Error", {}).get("Code") 913 error_class = self.exceptions.from_code(error_code) --> 914 raise error_class(parsed_response, operation_name) 915 else: 916 return parsed_response
ModelError: An error occurred (ModelError) when calling the InvokeEndpoint operation: Received client error (413) from primary and could not load the entire response body. See https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#logEventViewer:group=/aws/sagemaker/Endpoints/asr-facebook-wav2vec2-base-960h-2022-11-25-19-27-19 in account xxxx for more information.
`