aws / aws/sagemaker-python-sdk

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

Đã đóng
#4,930 0 bình luận 0 reaction 1 người được giao Được @erickb336 nhận Xem trên GitHub
component: Inference APIs and Interfaces type: bug
Ngôn ngữ chính
Python
Star
2.3k
Fork
1.3k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
35

Mô tả

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."]

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.