Skip to content

Commit

Permalink
Merge pull request #464 from cliveseldon/python-type-updates
Browse files Browse the repository at this point in the history
Remove tornando dependency from Python setup.py
  • Loading branch information
ukclivecox authored Mar 13, 2019
2 parents d4992e5 + 3fad42a commit fe570bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions python/seldon_core/api_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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():
Expand Down
5 changes: 3 additions & 2 deletions python/seldon_core/microservice_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,16 @@ 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"

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():
Expand Down
1 change: 0 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
'flask',
'flask-cors',
'redis',
'tornado>=4.3,<5',
'requests',
'numpy',
'flatbuffers',
Expand Down

0 comments on commit fe570bf

Please sign in to comment.