Skip to content

Commit

Permalink
[Serving]update np.object to np.object_ (PaddlePaddle#1021)
Browse files Browse the repository at this point in the history
np.object to np.object_
  • Loading branch information
heliqi authored Dec 30, 2022
1 parent 665f2e5 commit 6310ddc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/text/uie/serving/models/uie/1/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def execute(self, requests):
self.uie_model_.set_schema(schema)
results = self.uie_model_.predict(texts, return_dict=True)

results = np.array(results, dtype=np.object)
results = np.array(results, dtype=np.object_)
out_tensor = pb_utils.Tensor(self.output_names[0], results)
inference_response = pb_utils.InferenceResponse(
output_tensors=[out_tensor, ])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def execute(self, requests):
results = self.postprocess_.run([infer_outputs, ])
r_str = fd.vision.utils.fd_result_to_json(results)

r_np = np.array(r_str, dtype=np.object)
r_np = np.array(r_str, dtype=np.object_)
out_tensor = pb_utils.Tensor(self.output_names[0], r_np)
inference_response = pb_utils.InferenceResponse(
output_tensors=[out_tensor, ])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def execute(self, requests):
results = self.postprocess_.run(infer_outputs)
r_str = fd.vision.utils.fd_result_to_json(results)

r_np = np.array(r_str, dtype=np.object)
r_np = np.array(r_str, dtype=np.object_)
out_tensor = pb_utils.Tensor(self.output_names[0], r_np)
inference_response = pb_utils.InferenceResponse(
output_tensors=[out_tensor, ])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def execute(self, requests):

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

out_tensor = pb_utils.Tensor(self.output_names[0], r_np)
inference_response = pb_utils.InferenceResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def execute(self, requests):
dlpack_tensor)
output_tensor_1 = pb_utils.Tensor(
self.output_names[1], np.array(
im_infos, dtype=np.object))
im_infos, dtype=np.object_))
inference_response = pb_utils.InferenceResponse(
output_tensors=[output_tensor_0, output_tensor_1])
responses.append(inference_response)
Expand Down

0 comments on commit 6310ddc

Please sign in to comment.