Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #71 from ray-project/fix_serve_client_call
Browse files Browse the repository at this point in the history
Update method of accessing Serve controller
  • Loading branch information
shrekris-anyscale authored Oct 10, 2023
2 parents e5c11cb + d70c9b8 commit 9f681c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aviary/frontend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import requests
from ray import serve
from ray.serve.gradio_integrations import GradioIngress
from ray.serve._private.constants import SERVE_CONTROLLER_NAME, SERVE_NAMESPACE

from aviary import sdk
from aviary.common.constants import (
Expand Down Expand Up @@ -478,7 +479,7 @@ def noop(*args, **kwargs):
pass

# Get the port the serve app is running on
controller = ray.serve.context.get_global_client()._controller
controller = ray.get_actor(name=SERVE_CONTROLLER_NAME, namespace=SERVE_NAMESPACE)
port = ray.get(controller.get_http_config.remote()).port

blocks._queue.set_url(f"http://localhost:{port}{route_prefix}/")
Expand Down

0 comments on commit 9f681c9

Please sign in to comment.