@@ -0,0 +1,1556 @@
+import grpc%0Aimport time%0Aimport json%0Aimport sys%0Aimport uuid%0A%0Afrom arch.api.proto import inference_service_pb2%0Afrom arch.api.proto import inference_service_pb2_grpc%0Aimport threading%0A%0A%0Adef run(address):%0A    ths = %5B%5D%0A    with grpc.insecure_channel(address) as channel:%0A        for i in range(1):%0A            th = threading.Thread(target=send, args=(channel,))%0A            ths.append(th)%0A        st = int(time.time())%0A        for th in ths:%0A            th.start()%0A        for th in ths:%0A            th.join()%0A        et = int(time.time())%0A%0A%0Adef process_response(call_future):%0A    print(call_future.result())%0A%0A%0Adef send(channel):%0A    stub = inference_service_pb2_grpc.InferenceServiceStub(channel)%0A    request = inference_service_pb2.InferenceMessage()%0A    request_data = dict()%0A    request_data%5B'appid'%5D = '9999'%0A    # request_data%5B'modelId'%5D = 'arbiter-10000#guest-10000#host-10000#model'  #  You can specify the model id this way%0A    # request_data%5B'modelVersion'%5D = 'acd3e1807a1211e9969aacde48001122' #  You can specify the model version this way%0A    request_data%5B'caseid'%5D = uuid.uuid1().hex%0A%0A    feature_data = dict()%0A    feature_data%5B'device_id'%5D = '867920041242112'%0A    feature_data%5B'phone_num'%5D = '15013033489'%0A    feature_data%5B'fid1'%5D = 5.1%0A    feature_data%5B'fid2'%5D = 6.2%0A    feature_data%5B'fid3'%5D = 7.6%0A    request_data%5B'featureData'%5D = feature_data%0A%0A    print(json.dumps(request_data, indent=4))%0A%0A    request.body = json.dumps(request_data).encode(encoding='utf-8')%0A    print(stub.inference(request))%0A%0A%0Aif __name__ == '__main__':%0A    run(sys.argv%5B1%5D)%0A

add inference request example