aws / aws/sagemaker-python-sdk

TypeError: can't convert np.ndarray of type numpy.object.

Cerrado
#4,930 0 comentarios 0 reacciones 1 asignado Reclamado por @erickb336 Ver en GitHub
component: Inference APIs and Interfaces type: bug
Lenguaje dominante
Python
Estrellas
2.3k
Forks
1.3k
Merge medio
1 d 22 h
PR fusionados (30 d)
35

Descripción

I am making an endpoint with this images on AWS sagemaker
763104351884.dkr.ecr.us-west-2.amazonaws.com/pytorch-inference:2.5.1-gpu-py311-cu124-ubuntu22.04-sagemaker
I am trying to use SAM2 model by Meta
the numpy version seems to be correct :
Requirement already satisfied: numpy>=1.24.4 in /opt/conda/lib/python3.11/site-packages

When I try to predict I am getting this error:

2024-11-14T22:56:39,132 [INFO ] W-9000-model_1.0-stdout MODEL_LOG - Transform failed for model: model. Error traceback: ['Traceback (most recent call last):', ' File "/opt/conda/lib/python3.11/site-packages/sagemaker_inference/transformer.py", line 150, in transform', ' result = self._run_handler_function(', ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^', ' File "/opt/conda/lib/python3.11/site-packages/sagemaker_inference/transformer.py", line 284, in _run_handler_function', ' result = func(*argv_context)', ' ^^^^^^^^^^^^^^^^^^^', ' File "/opt/conda/lib/python3.11/site-packages/sagemaker_inference/transformer.py", line 267, in _default_transform_fn', ' data = self._run_handler_function(self._input_fn, *(input_data, content_type))', ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^', ' File "/opt/conda/lib/python3.11/site-packages/sagemaker_inference/transformer.py", line 280, in run_handler_function', ' result = func(*argv)', ' ^^^^^^^^^^^', ' File "/opt/conda/lib/python3.11/site-packages/sagemaker_pytorch_serving_container/default_pytorch_inference_handler.py", line 98, in default_input_fn', ' tensor = torch.FloatTensor(', ' ^^^^^^^^^^^^^^^^^^', "TypeError: can't convert np.ndarray of type numpy.object. The only supported types are: float64, float32, float16, complex64, complex128, int64, int32, int16, int8, uint64, uint32, uint16, uint8, and bool."]

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.