[Serve] Serve long running test fix (#8864)

This commit is contained in:
SangBin Cho 2020-06-09 10:17:18 -07:00
parent 07112dd131
commit 429c0507cf
2 changed files with 3 additions and 4 deletions

View file

@ -42,10 +42,9 @@ def echo(_):
return ["hi {}".format(i) for i in range(serve.context.batch_size)]
serve.create_endpoint("echo", "/echo")
config = {"num_replicas": 30, "max_batch_size": 16}
serve.create_backend("echo:v1", echo, config=config)
serve.set_traffic("echo", {"echo:v1": 1})
serve.create_endpoint("echo", backend="echo:v1", route="/echo")
print("Warming up")
for _ in range(5):

View file

@ -80,8 +80,8 @@ class RandomTest:
return new_endpoint
serve.create_backend(new_endpoint, handler)
serve.create_endpoint(new_endpoint, "/" + new_endpoint)
serve.set_traffic(new_endpoint, {new_endpoint: 1.0})
serve.create_endpoint(
new_endpoint, backend=new_endpoint, route="/" + new_endpoint)
self.endpoints.append(new_endpoint)