From e9e52d25b7d0a8041c2c4a1a8c843740a839e1a0 Mon Sep 17 00:00:00 2001 From: Clive Cox Date: Tue, 12 Mar 2019 14:13:53 +0000 Subject: [PATCH 1/2] remove tornando dependency --- python/setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python/setup.py b/python/setup.py index 949f752a72..0007c280d0 100644 --- a/python/setup.py +++ b/python/setup.py @@ -23,7 +23,6 @@ 'flask', 'flask-cors', 'redis', - 'tornado>=4.3,<5', 'requests', 'numpy', 'flatbuffers', From 3fad42a29c2f349d4e17db96b45f884650da8c62 Mon Sep 17 00:00:00 2001 From: Clive Cox Date: Wed, 13 Mar 2019 11:46:20 +0000 Subject: [PATCH 2/2] update print options for api testers in python --- python/seldon_core/api_tester.py | 11 +++++------ python/seldon_core/microservice_tester.py | 5 +++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/python/seldon_core/api_tester.py b/python/seldon_core/api_tester.py index d771ebdfcf..c95d389b77 100644 --- a/python/seldon_core/api_tester.py +++ b/python/seldon_core/api_tester.py @@ -61,9 +61,7 @@ def run_send_feedback(args): prediction_response=response_predict.response, reward=1.0, deployment_name=args.deployment, transport=transport) if args.prnt: - print("RECEIVED RESPONSE:") - print(response_feedback) - print() + print(f"RECEIVED RESPONSE:\n{response_feedback}\n") def run_predict(args): @@ -87,11 +85,12 @@ def run_predict(args): for i in range(args.n_requests): batch = generate_batch(contract, args.batch_size, 'features') + if args.prnt: + print(f"{'-' * 40}\nSENDING NEW REQUEST:\n") + print(batch) response_predict = sc.predict(data=batch, deployment_name=args.deployment) if args.prnt: - print("RECEIVED RESPONSE:") - print(response_predict) - print() + print(f"RECEIVED RESPONSE:\n{response_predict.response}\n") def main(): diff --git a/python/seldon_core/microservice_tester.py b/python/seldon_core/microservice_tester.py index 8dd6c1483c..d6215f8f9a 100644 --- a/python/seldon_core/microservice_tester.py +++ b/python/seldon_core/microservice_tester.py @@ -204,7 +204,8 @@ def run_predict(args): for i in range(args.n_requests): batch: ndarray = generate_batch(contract, args.batch_size, 'features') if args.prnt: - print(f"{'-' * 40}\nSENDING NEW REQUEST:") + print(f"{'-' * 40}\nSENDING NEW REQUEST:\n") + print(batch) transport = "grpc" if args.grpc else "rest" payload_type = "tensor" if args.tensor else "ndarray" @@ -212,7 +213,7 @@ def run_predict(args): response = sc.microservice(data=batch, transport=transport, method="predict", payload_type=payload_type) if args.prnt: - print(f"RECEIVED RESPONSE:\n{response}\n") + print(f"RECEIVED RESPONSE:\n{response.response}\n") def main():