Skip to content

Commit c7b0336

Browse files
Update client.py
1 parent fa82bf5 commit c7b0336

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/add_sub/client.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
model_name = "openpom_model"
77

88
smiles = ["CC(=O)OC1=CC=CC=C1C(=O)O"]
9-
input_data = np.array(smiles, dtype=object).reshape(1, 1)
9+
#input_data = np.array(smiles, dtype=object).reshape(1, 1)
10+
input_data = np.array([s.encode("utf-8") for s in smiles], dtype=np.bytes_).reshape(len(smiles), 1)
1011

1112
with httpclient.InferenceServerClient(triton_url) as client:
1213
inputs = [
@@ -17,6 +18,11 @@
1718
)
1819
]
1920
inputs[0].set_data_from_numpy(input_data)
21+
print("Input dtype:", input_data.dtype) #
22+
print("Input shape:", input_data.shape) #(1, 1)
23+
print("Input content:", input_data)
24+
print("input_data[0, 0]:", input_data[0, 0], type(input_data[0, 0]))
25+
2026

2127
outputs = [
2228
httpclient.InferRequestedOutput("OUTPUT", binary_data=True)

0 commit comments

Comments
 (0)