Skip to content

Commit 6310ddc

Browse files
authored
[Serving]update np.object to np.object_ (#1021)
np.object to np.object_
1 parent 665f2e5 commit 6310ddc

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

  • examples
    • text/uie/serving/models/uie/1
    • vision
      • classification/paddleclas/serving/models/postprocess/1
      • detection

examples/text/uie/serving/models/uie/1/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def execute(self, requests):
141141
self.uie_model_.set_schema(schema)
142142
results = self.uie_model_.predict(texts, return_dict=True)
143143

144-
results = np.array(results, dtype=np.object)
144+
results = np.array(results, dtype=np.object_)
145145
out_tensor = pb_utils.Tensor(self.output_names[0], results)
146146
inference_response = pb_utils.InferenceResponse(
147147
output_tensors=[out_tensor, ])

examples/vision/classification/paddleclas/serving/models/postprocess/1/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def execute(self, requests):
9292
results = self.postprocess_.run([infer_outputs, ])
9393
r_str = fd.vision.utils.fd_result_to_json(results)
9494

95-
r_np = np.array(r_str, dtype=np.object)
95+
r_np = np.array(r_str, dtype=np.object_)
9696
out_tensor = pb_utils.Tensor(self.output_names[0], r_np)
9797
inference_response = pb_utils.InferenceResponse(
9898
output_tensors=[out_tensor, ])

examples/vision/detection/paddledetection/serving/models/postprocess/1/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def execute(self, requests):
9595
results = self.postprocess_.run(infer_outputs)
9696
r_str = fd.vision.utils.fd_result_to_json(results)
9797

98-
r_np = np.array(r_str, dtype=np.object)
98+
r_np = np.array(r_str, dtype=np.object_)
9999
out_tensor = pb_utils.Tensor(self.output_names[0], r_np)
100100
inference_response = pb_utils.InferenceResponse(
101101
output_tensors=[out_tensor, ])

examples/vision/detection/yolov5/serving/models/postprocess/1/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def execute(self, requests):
9696

9797
results = self.postprocessor_.run([infer_outputs], im_infos)
9898
r_str = fd.vision.utils.fd_result_to_json(results)
99-
r_np = np.array(r_str, dtype=np.object)
99+
r_np = np.array(r_str, dtype=np.object_)
100100

101101
out_tensor = pb_utils.Tensor(self.output_names[0], r_np)
102102
inference_response = pb_utils.InferenceResponse(

examples/vision/detection/yolov5/serving/models/preprocess/1/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def execute(self, requests):
9595
dlpack_tensor)
9696
output_tensor_1 = pb_utils.Tensor(
9797
self.output_names[1], np.array(
98-
im_infos, dtype=np.object))
98+
im_infos, dtype=np.object_))
9999
inference_response = pb_utils.InferenceResponse(
100100
output_tensors=[output_tensor_0, output_tensor_1])
101101
responses.append(inference_response)

0 commit comments

Comments
 (0)