Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tornando dependency from Python setup.py #464

Merged
merged 2 commits into from
Mar 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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